tags:

views:

470

answers:

1

If I do this:

svn diff
   --summarize
   --old http.../svn/project/trunk
   --new http.../svn/project/branches/branch

I get a list like this:

D      http.../svn/project/trunk/deletedFile
A      http.../svn/project/trunk/addedFile
M      http.../svn/project/trunk/modifiedFile

It only shows the old paths. Is there a way to get the new paths as well? I'm parsing this output, and I'd like to get these paths:

http.../svn/project/branches/branch/deletedFile
http.../svn/project/branches/branch/addedFile
http.../svn/project/branches/branch/modifiedFile
+2  A: 

You are comparing the HEAD of trunk and the branch, essentially asking "what needs to happen to trunk to make it the same as branch?", so the answer is in terms of changes to trunk. If you swap old and new, you will get the same list of files, in terms of the branch, but with the opposite operation.

If a file was added in the branch and not trunk, and you run your existing diff (old=trunk, new=branch) you see:

A    http:.../project/trunk/file

If you swap old and new (new=branch, old=trunk), you'll get:

D    http:.../project/branches/branch/file
Jeff Dallien