Sep 24 2008

File Diff in SourceSafe / VSS

Published by Kevin Gao at 11:28 am under SourceSafe

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
(Launch Difference Options)

 

In Difference Options, we can specify the two files, local or source-controlled.

Specify the two files for comparison
(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
(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:

Diff Result

 

SourceAnywhere - the SQL Server-based SourceSafe Replacement The SQL Server-based Source Control Software Designed to be a SourceSafe Replacement SourceAnywhere for VSS - the Fastest SourceSafe Remote Access Tool Recommended by Microsoft 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

One response so far

One Response to “File Diff in SourceSafe / VSS”

  1. Rajesh Bhogadion 13 Apr 2010 at 6:55 am

    Good Work…Thanks a lot for posting this

Trackback URI | Comments RSS

Leave a Reply

Version Control Software/System | Source Control Software/System | Software Configuration Management | SCM Hosting Solution | Bug Tracking System
SourceSafe (VSS) Replacement/Alternative | SourceSafe (VSS) Hosting | SourceSafe (VSS) Remote/Web/Internet Access | Scanner COM
Customer Service Software | Live Chat | Live Help | Forum Software | Knowledge Base Software | Newsletter Email Marketing Software