[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Move a bunch of branches with one commit

From: Kylo Ginsberg <kylo.ginsberg_at_gmail.com>
Date: 2007-03-12 23:03:14 CET

Following a cvs2svn conversion, I would like to organize branches and
tags to meet our needs. I know that I could commit each move
individually, but if I can roll all the moves into a single commit I'd
like to do that. That said, I don't want to take the time and disk
space to actually check out all the branches in question, so I'm doing
non-recursive updates of the interesting branches and moving them (see
script below for a partial example).

My question: Is there a better way to do this? Any gotchas with what I'm doing?

Thanks,
Kylo

#!/bin/bash

# move all branches containing "unlabeled" to /lost+found

svn co -N svn://snow/svnroot .
svn up -N svn://snow/svnroot/branches branches
svn up -N svn://snow/svnroot/lost+found lost+found

cd branches
for i in `svn ls svn://snow/svnroot/branches | grep unlabeled`; do
    svn up -N svn://snow/svnroot/branches/$i $i
done

for i in `ls`; do
    svn move $i ../lost+found
done

cd ..

svn ci -m "big move"

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Mar 12 23:03:35 2007

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.