Mark Galeck
Mark Galeck

Reputation: 6395

svn: how to compare working copy of a branch, with a specific revision of the trunk

This is a very common situation, and I cannot find in svn documentation or google-fu, a solution for it.

Suppose I copy a branch from a "known good" revision of the trunk and I check it out:

>svn copy -m 'my branch' -r 100 svn+ssh://svn/trunk svn+ssh://svn/my_branch
>svn co svn+ssh://svn/my_branch
>cd my_branch

Now I do many edits for files under my_branch directory, and periodically I merge with "known good" revisions of the trunk, like this:

>svn merge -r 100:110 svn+ssh://svn/trunk

At any point in time, I and my reviewer, want to see, all the differences for all the files under my_branch directory, compared to the last revision of the trunk I merged with (these are my edits + possibly changes resulting from conflicted merges). So, all the differences between all the files in the working copy, compared to the corresponding files in revision 110 of svn+ssh://svn/trunk.

How to do this?

Edit: uzsolt suggested this:

svn diff ^/trunk@REV1 ^/my_branch@REV2

This is a good start, but I already had done something like this, and there are two problems with this suggestion:

1.It prints my changes, plus a gazillion of:

Property changes on: path/to/foobar
___________________________________________________________________
Modified: svn:mergeinfo
    Merged trunk:r90-110

I don't want those.

2.I don't want to commit my changes, and then compare that revision to a revision of the trunk. I want to compare the working copy, with a revision of the trunk.

Upvotes: 0

Views: 363

Answers (2)

Mark Galeck
Mark Galeck

Reputation: 6395

Kevin, a local guru where I work, gave the following answer:

svn diff --old ^/trunk@110 --new .

You still have to get rid of all the Property changes on: stuff.

Upvotes: 1

uzsolt
uzsolt

Reputation: 6037

Maybe I misunderstood you but maybe the following helps you:

svn diff ^/trunk ^/my_branch

You can append revision number if you need:

svn diff ^/trunk@REV1 ^/my_branch@REV2

Upvotes: 0

Related Questions