tags:

views:

66

answers:

3

I want to do

svn mkdir http://svn.mydomain.com/.../projectX/trunk
svn mkdir http://svn.mydomain.com/.../projectX/branches
svn mkdir http://svn.mydomain.com/.../projectX/tags
svn propset someprop someval http://svn.mydomain.com/.../projectX
svn propset anotherprop anotherval http://svn.mydomain.com/.../projectX

in a single commit. Is there a way to batch up svn operations on the repository server? I could swear I've seen a way to do this before, but I can't remember the magic words to use or to google.

+1  A: 

This is probably not the answer you're looking for, but if you were to check out your root directory to a working copy, then executed svn mkdir trunk, svn mkdir branches, svn mkdir tags, and then did your svn commit then those directory creations would be batched.

PP
+5  A: 

You could always svn checkout the projectX directory, mkdir trunk/branches/tags locally then svn add them (or just use svn mkdir locally rather than on the URL, which does the same thing), set the properties and then issue a single svn commit.

njk
That's the way to do it, but you have to `svn add` the created directories before changing their properties. After all that, you are ready to commit everything in one revision increment.
RedGlyph
+2  A: 
  1. you can create multiple directories in a single commit:

    svn mkdir -m "a single commit" /path/to/folder_1 /path/to/folder_2

    However, you cannot propset directories in the same commit :-(

  2. You can also use svnmucc to combine repository actions in a single commit, however also here you cannot propset directories which are not already inside the repository.

So you can minimize the number of commits to 2 (I left out the -m switch for the log message):

svn mkdir http://svn.mydomain.com/.../projectX/trunk http://svn.mydomain.com/.../projectX/branches http://svn.mydomain.com/.../projectX/tags
svnmucc propset someprop someval http://svn.mydomain.com/.../projectX propset anotherprop anotherval http://svn.mydomain.com/.../projectX

If you still want a single commit, you have to check out a working copy and do all manipulations and commit afterwards

Peter Parker
yay! I knew I had seen a command like this someplace. svnmucc was it! where's the manual for it? I can't seem to find it.
Jason S
I never found more than the build in help
Peter Parker