logo

Art Of Eclipse

« Home » « About » « Github »


svn diff between tow repositories

To make svn diff include all the unversioned files from your local working copy you have to add these files first. svn diff outputs the same changeset that svn commit would use.

If you know for sure that all unversioned files should be added here’s what you could do.

Prepare a list of unversioned files by taking from the output of svn status all the lines that start with a question mark:

svn status | grep ^? | sed -r 's/^\? +//' > ../unversioned_files_list.txt

You can then pass that list of files to svn add using xargs:

xargs -r -d '\n' svn add < ../unversioned_files_list.txt

And then produce the patch:

svn diff > ../my_patch.patch

If you don't want to keep those files added, use the list of files to unadd them:

xargs -r -d '\n' svn rm --keep-local < ../unversioned_files_list.txt
svn diff --old=https://svn-777.prod.hosting.acquia.com/aljbalkanmr/trunk --new=https://svn-777.prod.hosting.acquia.com/aljbalkanmr/tags/2012-04-10/ > ~/Desktop/balkans_diff.txt