scdiff

See the changes to code kept in CVS, Subversion or Git repository.
Download

scdiff Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Freeware
  • Publisher Name:
  • Krzysztof Kowalczyk
  • Operating Systems:
  • Windows All
  • File Size:
  • 28 KB

scdiff Tags


scdiff Description

Imagine this: you've just made changes to code kept in CVS, Subversion or Git repository. You're ready to check them in but you want to take a last look at the changes. Usually you would do cvs diff -u or svn diff. The scdiff application will allow you to see the changes with an external gui diff program. I find it much easier to understand the changes that way (as opposed to looking at unified diff in the console). By default it uses windiff.exe but you can use -diff option to select any other program (e.g. WinMerge or Araxis Merge) . Usage scdiff If you run scdiff without any arguments, it'll determine if a given directory is under CVS or Subversion control, check for locally modified files and launch external diff program showing local modifications. By default it uses windiff (assumes that windiff.exe is in the %PATH%) but you can use -diff option to use any other diff program that can be launched from command lind. First two arguments given to the diff program are directories to diff. This works for all diff programs I've tested it (windiff, WinMerge and Araxis Merge). By its nature scdiff uses temporary directory for storing original and modified files so even after you finish, you can still see the result of previous diff. Option -old does exactly that. It saves the time (getting files from repository may take some time). To see built-in help, use -h option. Option -cvs defaults to "cvs -z3". Option -cvsargs defaults to "-u -N". In theory you shouldn't need to change them. Not that it's terribly interesting, but just in case you were wondering. First, we capture the output of cvs diff -u or svn diff. From that we extract names of the files that are locally modified and the revision number of the file before modifications. The we check out the originals (using cvs update -p -r rev or svn cat ...), copy the originals to $tempDir/sc_originals, our locally modified copies to $tempDir/sc_altered and launch external diff program with $tempDir/sc_originals and $tempDir/sc_altered as arguments. Pretty simple and possibly suboptimal (subversion can do a diff without contacting remote repository, so it should be possible to significantly speed up the program if I knew how to get the original without asking remote repository).


scdiff Related Software