Viewing Differences in Source Control Files—Team Foundation Server

One of the benefits of Lingo's integrated source control is that you can view the history and differences for a particular file.

Ways to View Differences Between Files

You can view differences between files in the following ways:

  • Two Versions of Same Source Control File (History/Roll Back) You can view code and content differences between two source control versions of the same file. This is useful if you need to roll back to an earlier version of a file. SeeRolling Back to an Earlier Version of a File—Team Foundation Server and Getting the Latest Version of Source Control Files—Team Foundation Server.

    Example You have been working on translating a particular file for a few days. Each day you check out the latest version of that file from source control, make your changes, and check the file back in to source control at the end of the day. At a certain point, you determine that you need to "roll back" to an earlier version of the file, using it to replace the latest version. Therefore, you use this feature to view the highlighted differences between the current version and an older version of the file. Once you have identified the older version that you want to use, you can perform a "get" of that version.

  • Local Versus Source Control Version of a File You can view code and content differences between the local version of a file and the source control version of that file.

    Example You check out a topic from source control and then make changes to some of the translations in your local copy of that file. You save your changes. Later that day, you want to revisit the new translations, but you cannot remember exactly which translations you added and which were there before. Therefore, you use this feature to highlight the text differences between your local checked-out version of the file and the version stored in the source control application. The new text is highlighted on the side displaying the local version of the file.

  • Local Versus Source Control Version of All Files in a Folder You can view file differences between the local version of the files in a folder and the source control version. Most likely, you will use this to view all of the differences between the local files and source control files in a specific content folder.

    Example You are working on a large Lingo project. During the course of the day, you edit several files in the project. At the end of the day, you check in most of your files, but forget to check in a few of them. Later, you realize that you missed a few files, and now those files are out-of-date. Therefore, you use this feature to see the file-level differences between your local copy of the folder in the File List and the source control copy. The differences are color coded, so you can easily identify the files in question. (By default, the files that are included only in your local copy are green, and the files that are included only in source control are red.)

How to View Differences Between Two Versions of the Same Source Control File

  1. In the Source Control Explorer or File List, select the relevant file(s).
  2. Do one of the following, depending on the part of the user interface you are using:
    • Ribbon Select Source Control > View History.

    • Right-Click In the File List, select the file(s) you want to view. In the local toolbar of the File List, click , then select View History .

    The History dialog opens.

  3. From the list, select the first file version that you want to compare.
  4. Hold the CTRL key and select the second file version from the list.
  5. Select Show Differences.The Differences Editor opens.

  6. (Optional) In the Differences Editor, use the buttons in the local toolbar to customize the information shown in the editor.
  7. When you are finished viewing the differences, close the window.

How to View Differences Between the Local Version of a File and the Source Control Version

  1. In the Source Control Explorer or File List, select the relevant file(s).
  2. Do one of the following, depending on the part of the user interface you are using:
    • Ribbon Select Source Control > Show Differences.

    • Right-Click In the File List window pane, right-click the file(s) you want to view and select Source Control > Show Differences.

    The Differences Editor opens.

  3. (Optional) In the Differences Editor, use the buttons in the local toolbar to customize the information shown in the editor.
  4. When you are finished viewing the differences, close the window.

How to View Differences Between the Local Version of All Files in a Folder and the Source Control Version

  1. In the Content Explorer or Project Organizer, select the relevant folder.
  2. Do one of the following, depending on the part of the user interface you are using:
    • Ribbon Select Source Control > Show Differences.

    • Right-Click Right-click the folder you want to view and select Source Control > Show Differences.

    The Differences Options dialog opens.

  3. (Optional) Use this dialog to specify the type of information that you want to see in the Differences Editor. (You can also choose these options from the local toolbar of the Differences Editor.)

    • Show files that are only in the Left folder Displays the files on the left side of the Differences Editor. The left side is used to show the local copies of your project files.
    • Show files that are only in the Right folder Displays the files on the right side of the Differences Editor. The right side is used to show the source control copies of your project files.
    • Show files that are different in both folders Displays the files where differences occur between the local copy and source control copy of the project. For example, the left side might display files that you have created in your local copy but have not yet been added to source control.
    • Show files that are the same in both folders Displays the files that are the same in the local copy as they are in the source control copy.
    • Recursive Displays files recursively. In other words, if you have files contained within folders, selecting this button will ensure that you see all of the files, not just the folders.
  4. Click OK. The Differences Editor opens.

  5. (Optional) In the Differences Editor, use the buttons in the local toolbar to customize the information shown in the editor.

What’s Noteworthy?

Note When you check out a file from source control, you are actually checking out the file's corresponding XLF file. You will see the XLF file if you open the Source Control Explorer. This is because you need the XLF file available in order to make changes, view the file's history, or view differences.