Home > Subversion > SVN status on branch

SVN status on branch

I was trying to figure out what had changed since I branched. You can diff changes between versions, but you cannot run status on the difference between changes.

A simple workaround to get something that works like status is to run diff and then just print out those lines that start with “Index”. You need two things to do this:

1) The branch revision number: You need the revision number of the revision that created the branch. You can find this by using “svn log –stop-on-copy” from within the branch.
2) The URL of the branch. If you run “svn info” on the branch you can get this address.

svn diff -r <branch num>:HEAD http://<repo_url>/branches/<name of branch> | grep "^Index"


By the way, the most natural way to do this within subversion, is to first merge and then run status. Run the following code from within trunk:
svn merge -r <branch num>:HEAD http://<repo_url>/branches/<name of branch>"
svn st

Which is a bit much if you don’t want to merge yet.

Categories: Subversion Tags:
  1. No comments yet.
  1. No trackbacks yet.