All examples of svn branching I have seen so far look like this svn cp -m 'Making test branch' svn://svnrepo/hellosite svn://svnrepo/hellosite2
So in order to branch I need to specify full URL of remote repository every time. But:
So why in the world should I type complete URLs every time?!! Or do I miss something? Is there some shortcut that allows referring current remote repository? Something like svn cp -m 'Making test branch' //hellosite //hellosite2
All you need to do is make a copy of your project using "svn copy". This command will require the URL of your project's /trunk directory as well as the URL of the directory where you want to create your branch. This location will virtually always be inside of your /branches directory.
Select the folder in your working copy which you want to copy to a branch or tag, then select the command TortoiseSVN → Branch/Tag.... If you can't remember the naming convention you used last time, click the button on the right to open the repository browser so you can view the existing repository structure.
Use svn status command to get the status of the file in the working copy. It displays whether the working copy is modified, or its been added/deleted, or file is not under revision control, etc. 'M' represents that the item has been modified.
Using SVN 1.6 or later, if you're inside a working copy at the time then you can use the caret notation as a short-cut to the repository root, e.g.
svn cp -m 'Making test branch' ^/trunk ^/branches/hellosite
Note that on Windows at least you'll need to surround the ^/trunk
in double quotes to get it through the shell.
svn cp -m "Making test branch" "^/trunk" "^/branches/hellosite"
You can simply add an alias to your shell. See this this SO post for example.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With