Viewing Differences in Source Control Files—Subversion

One of the benefits of Flare'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. See Rolling Back to an Earlier Version of a File—Subversion and Updating Source Control Files—Subversion.

    Example You have been working on a particular topic for a few days. Each day you modify that topic file, make your changes, and commit the file back to the server 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 retrieve 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 modify a procedure topic from source control and then add some lines of text to your local copy of that topic file. You save your changes. Later that day, you want to revisit the new content that you wrote, but you cannot remember exactly which lines of text you added. Therefore, you use this feature to highlight the text differences between your local version of the file and the version stored in the source control application. The new lines of text are 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 difference between the local files and source control files in either your Content Explorer or Project Organizer.

    Example You are working on a large Flare project. During the course of the day, you edit several topics in the project. At the end of the day, you commit most of your files, but forget to commit a few files. Afterward, 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 Content Explorer root folder 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.) You can then right-click on the files that were added only to the local copy, and you can select to add them to source control.

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

  1. In one of the window panes (e.g., Content Explorer, Source Control Explorer, File List, Project Organizer, Pending Changes window pane), 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 If you have the Content Explorer, Project Organizer, Source Control Explorer, Pending Changes window pane, or File List open, right-click the file(s) you want to view and select Source Control > 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 one of the window panes (e.g., Content Explorer, Source Control Explorer, File List, Project Organizer, Pending Changes window pane), 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 If you have the Content Explorer, Project Organizer, Source Control Explorer, Pending Changes window pane, or File List open, 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.