Comparing your working copy files with the HEAD revision

To compare a working copy file [filename] with the HEAD revision in the repository, use the following command:

svn diff -rHEAD [filename]

You can compare all modified files with the following string of commands:

svn status | grep '^M' | awk '{print $2}' | xargs svn diff -rHEAD

You can create a simple bash alias by adding the following to /etc/bash/bashrc or ~/.bashrc

alias svndiffall="echo svn status | grep '^M' | awk '{print $2}' | xargs svn diff -rHEAD"

Also see Bash aliases.

References

The string of commands is a modification of those here: Adding all new files with SVN.

Last modified: 06/06/2007 Tags: (none)

This website is a personal resource. Nothing here is guaranteed correct or complete, so use at your own risk and try not to delete the Internet. -Stephan

Site Info

Privacy policy

Go to top