Редактиране

Споделяне чрез


View file changes using annotate in Visual Studio

Azure DevOps Services | Azure DevOps Server 2022 - Azure DevOps Server 2019

Visual Studio 2019 | Visual Studio 2022

In Team Foundation Version Control (TFVC), you can use annotate in Visual Studio to view the changes in earlier versions of file. You can see information about the change, view the changeset details, compare with previous versions, and more.

Prerequisites

To annotate a file

  1. On the Visual Studio menu bar, select View > Solution Explorer.

  2. In Solution Explorer, right-click the version of the file that you want to annotate, select Source Control, and 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 was 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.