Saturday, 15 January 2011

How to see all changes on a branch in Subversion

Ever wanted to see a diff containing all the changes you made on a branch since the branch was created from trunk? This is one of those things that should be easy in Subversion but isn't (or I couldn't find an easy way).

Helpfully, "svn help log" has a hint:

Logs follow copy history by default. Use --stop-on-copy to disable this behavior, which can be useful for determining branchpoints.

I've turned that idea into a handy wrapper script around "svn diff", which adds a revision specifier for "the revision just before this branch was created". I call it BRANCHPT or BRPT for short. Otherwise, the script just passes all arguments through unchanged to "svn diff".

No comments:

Post a Comment