Zdieľať cez


View file changes using annotate

TFS 2018

Visual Studio 2019 | Visual Studio 2022

In Team Foundation Version Control (TFVC), you can annotate a file to learn who made changes and what changes they made in all earlier versions of the file.

Prerequisites

To perform these procedures, you must have the Read permission set to Allow. For more information, see Default TFVC permissions.

To annotate a file

  1. On the Visual Studio menu bar, select View > Other Windows > Source Control Explorer.

  2. In Source Control Explorer, right-click the version of the file that you want to annotate, and then select Annotate.

    The Annotated window displays the annotated file.

    Each annotation appears to the left of the text that was changed and displays:

    • The changeset number, or Local if you have pending changes in your local workspace. To see more information about the changeset, select the changeset number.

    • The name of the person who made the change.

    • The date.

    When you hover over an annotation, the following information appears:

    • Path: The path of the changeset

    • Changeset: The changeset number

    • Owner: The name of the person who made the change

    • Change: The type of change that was made

    • Date: The date of the changeset

    • Lines: The line numbers where the changes were made

    • Comment: The changeset check-in comment

  3. If you right-click an annotation, you can select:

    • Changeset Details to display the Changeset Details page in Team Explorer.

    • View History to open the History window.

    • Compare With Previous Version to compare the version you're examining with the previous version. The comparison appears in the Diff window.

      If you have pending changes in your local workspace, you can compare the version you're examining with the version you checked out from the server. Right-click the Local annotation information, and then select Compare With Workspace Version (<server name>). The comparison appears in the Diff window.

    • Annotate This Version to view annotation information for the selected version and all earlier versions of the file. This information appears in an Annotate window.

    • Track Changeset to see to which branches the changeset has been merged into. For more information, see View where and when changesets have been merged.

    • Get This Version to download the selected version of the file to your local workspace.