Federer
Federer

Reputation: 34805

Find difference between trunk and branch?

Is there a way to find the differences between the trunk and say a branch 0.4.x?

I need to create a tag - however I can't remember if my latest corrections were done in the trunk or the branch.

Upvotes: 72

Views: 74842

Answers (4)

James McGuigan
James McGuigan

Reputation: 8106

If you just want to diff against the current branch, you can just use a dot .

svn switch ^/branches/branchName
svn diff . ^/trunk

Upvotes: 2

Kanchan Srivastava
Kanchan Srivastava

Reputation: 389

svn diff ^/trunkUrl/fileName ^/branchUrl/fileName

This will give you the difference between a file in branch and trunk.

Upvotes: 6

Sumit Patil
Sumit Patil

Reputation: 76

You can use the meld tool for comparison instead of using command prompt to see the difference. It goes something like this.

svn diff --diff-cmd='meld' --old http://.../repo/branches/0.4.x --new http://.../repo/trunk/

Upvotes: 2

David Schmitt
David Schmitt

Reputation: 59375

If you have a checkout of the repository at hand, you can use the ^ (caret, search for it in the manual) notation to reference the root of the repo like this:

svn diff --old ^/branches/0.4.x --new ^/trunk

This works since Subversion 1.6.

If you have an older subversion or no handy checkout of the repo, you can use absolute paths, as described in the original redbook:

svn diff --old http://.../repo/branches/0.4.x --new http://.../repo/trunk/

should give you the answer you're looking for.

Replace http://.../repo/ with the actual URL of your repository.

Upvotes: 112

Related Questions