2

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.

mobibob
  • 8,670
  • 20
  • 82
  • 131
  • Though perhaps not an exact duplicate, I refer you to my answer for [How to list switched svn directories recursively in a working copy?](http://stackoverflow.com/a/12773072/115690) for a command-line technique and to [How can I see which branch is current?](http://stackoverflow.com/a/6100733/115690) for a graphical technique to answer a more general form of your question. – Michael Sorens Jan 07 '14 at 01:44

3 Answers3

9

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.

Anders Forsgren
  • 10,827
  • 4
  • 40
  • 77
  • Unfortunately for me, the IDE and command line are using different SVN clients. If I use the command line, it will force an update before I can even get the info. The update is not compatible with the IDE (trust me I have no choice) and essentially corrupts my project with respect to the IDE. But in the spirit of this answer, I tried to dump the svn hidden files to see if I could locate the meta-data --- no luck. – mobibob Jan 10 '14 at 16:44
3

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.

Ben
  • 8,725
  • 1
  • 30
  • 48
  • This answer prompted me to check the other perspectives in my IDE and I found the properties that showed me what I needed to know. But that was after I did a round-about poke. I found an innocuous file and committed it -- then I went to the SVN browser (website tool) and looked to see if the trunk or branch logged the event. I got away with this since I am also the Admin for the repo. – mobibob Jan 10 '14 at 16:51
2

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
...
Lazy Badger
  • 94,711
  • 9
  • 78
  • 110
  • I have an IDE compatibility issue with the SVN client and the command line (see my comment to @Anders Forsgren above). Good answer, but did not help me on this project. – mobibob Jan 10 '14 at 16:45
  • 1
    @mobibob - create copy of used WC, upgrade it (copy) and use `svn info`. Remove copy after all – Lazy Badger Jan 11 '14 at 03:44