How do I compare one branch with another? I want to compare a branch with the latest revision in trunk.
A:
Here's a post from Murray Cumming which describes the non-obvious process:
- Discover the revision numbers: You need to know the revision numbers of the latest versions in each of the branches. It looks like svn log is the only way to do that.
- cd into one of the branch directories, such as trunk.
- Supply the revision numbers to the svn diff command:
svn diff -r123:145
Stef
2009-11-24 00:59:56
Won't this just tell you what's changed in `trunk` since the last commit to the branch? Apologies if I'm missing something - it's getting late here...
SimonJ
2009-11-24 01:10:39
You don't need to look for the latest revision number in each branch: simply use `HEAD`. But this isn't what the OP was asking for -- he wanted to compare between his branch and trunk, not between two revisions in the same branch.
Ether
2009-11-24 01:33:20
+4
A:
You could start with:
svn diff http://REPOS/trunk http://REPOS/branches/B
(Where http://REPOS
is your repository path including the parents of trunk
and branches
.)
This will print a large quantity of text, including all the textual changes but not the binary changes except to say where and when they occurred.
Edmund
2009-11-24 01:04:57
Thanks! Your answer led me to this http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-diff.html which explains how to do the same with TortoiseSVN
tukushan
2009-11-24 21:18:42