Well, this is a short note to myself so the next time I want to create a branch of a new project, I won’t need to search through the Internet.
Before doing
$ svn copy http://svn.example.com/repos/calc/trunk \
http://svn.example.com/repos/calc/branches/my-calc-branch \
-m "Creating a private branch of /calc/trunk."
http://svn.example.com/repos/calc/branches/my-calc-branch \
-m "Creating a private branch of /calc/trunk."
to make a new branch of a new project (which don’t have any branches yet), I’ll need to do
svn mkdir http://svn.example.com/repos/calc/branches \
-m "make the branches directory to hold all the branches"
-m "make the branches directory to hold all the branches"
first.
Or I’ll get an error message like
svn: Path ‘branches’ not present
The reason is, like the error message said, there is no directory “branches” in the repo, and svn copy, like the “cp” command, won’t make a directory if it’s not there. It will assume I made a typo. A safe guard. And I need to explicitly create the directory.
Comments 8
Thanks, just what I was looking for.
Posted 10 Apr 2008 at 4:46 pm ¶You could use “–parents” switch on the “svn copy” command - it makes intermediate directories if they do not exist.
Posted 11 Mar 2010 at 11:11 pm ¶For more options, do “svn copy –help” at CLI
the blog is very nice
Posted 28 Sep 2010 at 1:42 pm ¶The Personal Injury specialists at The Mastrangelo Law Offices offer a free no obligation initial consultation. http://www.truspeedoc.com/
Sweet, cheers dude.
Posted 03 Feb 2011 at 12:21 am ¶Thanks! it saved my time.
Posted 24 Mar 2011 at 1:08 pm ¶Thank you !
Posted 05 May 2011 at 7:13 pm ¶Thanks! I was looking for this for ages. In case it helps drive SEO - I was looking for how to add a branches directory to my existing SVN repository and was getting the error:
svn: Path ‘branches’ not present
This solved my problem!
Posted 12 Mar 2012 at 2:52 pm ¶Thanks saved my time!!
Posted 20 Mar 2013 at 3:04 pm ¶Post a Comment
You could use <code type="name"> to get your code colorized