Comparing 2 revisions with svn diff (v 1.3.2) and get the changed paths only

diffsvn

I want to compare 2 revisions using version 1.3.2 of svn and copy the changed files/folders to some place on the server. The copying is not the problem, what I have trouble with is getting only the changed paths. I am using this command:

svn diff -r 90:93 URL --username name --password password

This returns me a lot of information, how would I extract only the changed paths from that info? The –summarize is not available for version 1.3.2. What I want is something like:

/path/test.txt

Thanks! 🙂

Best Solution

Are you on Unix/Linux/Mac, or have Cygwin installed?

You could pipe the output through grep to find all the lines that begin with Index:. (If I remember Subversion 1.3's diff command output) That would give you just the names of the files that differ. It's what I use to do with CVS.

$ svn diff -r 90:93 --username name --password password URL | grep "^Index: "

If that works, and you want to remove Index, you can use sed:

$ svn diff -r 90:93 --username name --password password URL \
> | sed -n /^Index: /s/^Index: //p'