Using Visual SourceSafe - File Diff
This article is a part of SourceSafe / VSS Tutorial
Why File Diff
File Diff is one of the important features that we use with a version control system. File Diff compares two files and shows the differences. With these differences, we can better track the modification of our code or documents.
What File Diff can do
File Diff can compare:
- A local file and a source-controlled file.
- Two local files.
- Two source-controlled files.
- Two versions of a source-controlled file.
For the first three situations, we can launch Difference Options by right clicking on the file list pane and selecting Show Differences…
(Launch Difference Options)
In Difference Options, we can specify the two files, local or source-controlled.
(Specify the two files for comparison)
To compare two versions of a source-controlled file, we can launch Difference Options in the History window of the source-controlled file.
(Launch Difference Options in History)
For binary files, File Diff can indicate if they are identical but cannot show the differences.
How File Diff works
File Diff compares the two files line by line.
- If a line exists in the first file only, SourceSafe indicates this line as deleted.
- If a line exists in the second file only, SourceSafe indicates this line as added.
- If a line in both two files has different contents, SourceSafe indicates this line as changed.
Example of File Diff
For example, we have an original file with the content: 111 222 333 444 555 666
After we make the following changes: Added ‘000’ before the first line Changed 2nd line from ‘222’ to ‘aaa’ Deleted the 4th line
We get the current file with the content: 000 111 aaa 333 555 666
For the diff result:
The SQL Server-based Source Control Software Designed to be a SourceSafe Replacement
The Fastest SourceSafe Remote Access Tool Recommeded by Microsoft
Links: Previous article ««: Lock-Modify-Unlock or Copy-Modify-Merge in SourceSafe / VSS Next article »»: File Merge in SourceSafe / VSS SourceSafe How To series home page: VSS / SourceSafe Tutorial