How can one determine if an svn working copy is from branch or trunk?

4.6k views Asked by At

My project has the standard trunk/tags/branches structure and typically work in the trunk. Before the holiday, I switched to the Branch to make an isolated change and now I have lost recall if I ever switched back to trunk. Is there a way to check if my local-working copy corresponds to the branch or trunk?

I want to start making more changes for the upcoming release and when I commit at the end-of-day, I don't want to commit to the branch and I am not ready to merge the branch.

3

There are 3 answers

1
Ben On BEST ANSWER

You've got the answer for command-line tools, but if you're using TortoiseSVN on Windows, you can just right-click your working copy and click "Properties". There is a Subversion tab in that dialog which tells you the URL your working copy is pointing to.

2
Lazy Badger On

For WC-root, you have to use svn info command and in it's output check content any of two values of keys: URL or Relative URL

Sample from my WC

>svn info
...
URL: https://subversion.assembla.com/svn/proofsheets.natasha/branches/FullHTML
Relative URL: ^/branches/FullHTML
...
1
Anders Forsgren On

You can use the svn command line utility svn info from the working copy root directory. It will tell you revision, repository url and much more.