You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Michael Stillwell <mj...@beebo.org> on 2008/01/02 16:45:19 UTC

moving multiple directories: {foo,bar} to quux/{foo,bar}

Is there a neat way of moving multiple files/directories at once?
I've been doing something like:

  $ for d in dir1 dir2 ; do svn mv -m '' $SVNROOT/$d $SVNROOT/quux/$d ; done

but this: (a) creates a revision per directory; (b) requires knowledge
of the repository URL; and (c) isn't very pretty.

Basically, is there a subversion equivalent of:

  $ mv dir1 dir2 quux

?  (Or of TortoiseSVN's right-click drag.)




--M.

-- 
http://beebo.org
+44 78 2118 9049

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: moving multiple directories: {foo,bar} to quux/{foo,bar}

Posted by Mark Reibert <sv...@reibert.com>.
I realize you prefer not to have knowledge of the repo URL, but you can
accomplish this w/o a working copy with mucc (or svnmucc). See:

http://subversion.tigris.org/servlets/BrowseList?list=users&by=thread&from=605089

On Wed, 2008-01-02 at 16:45 +0000, Michael Stillwell wrote:
> Is there a neat way of moving multiple files/directories at once?
> I've been doing something like:
> 
>   $ for d in dir1 dir2 ; do svn mv -m '' $SVNROOT/$d $SVNROOT/quux/$d ; done
> 
> but this: (a) creates a revision per directory; (b) requires knowledge
> of the repository URL; and (c) isn't very pretty.
> 
> Basically, is there a subversion equivalent of:
> 
>   $ mv dir1 dir2 quux
> 
> ?  (Or of TortoiseSVN's right-click drag.)
> 
> 
> 
> 
> --M.

-- 
----------------------
Mark S. Reibert, Ph.D.
svn@reibert.com
----------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: moving multiple directories: {foo,bar} to quux/{foo,bar}

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jan 2, 2008, at 10:45, Michael Stillwell wrote:

> Is there a neat way of moving multiple files/directories at once?
> I've been doing something like:
>
>   $ for d in dir1 dir2 ; do svn mv -m '' $SVNROOT/$d $SVNROOT/quux/ 
> $d ; done
>
> but this: (a) creates a revision per directory; (b) requires knowledge
> of the repository URL; and (c) isn't very pretty.
>
> Basically, is there a subversion equivalent of:
>
>   $ mv dir1 dir2 quux
>
> ?  (Or of TortoiseSVN's right-click drag.)

In Subversion 1.5, you will be able to say

	$ svn mv dir1 dir2 quux
	$ svn commit

See:

	http://subversion.tigris.org/issues/show_bug.cgi?id=747

Until then, you'll have to do each move separately:

	$ svn mv dir1 quux
	$ svn mv dir2 quux
	$ svn commit

If you want to do it remotely on repository URLs without using a  
working copy, you may be able to do so with mucc (called "svnmucc" in  
1.5):

	http://svn.collab.net/repos/svn/branches/1.4.x/contrib/client-side/ 
mucc.c

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

RE: moving multiple directories: {foo,bar} to quux/{foo,bar}

Posted by "Reedick, Andrew" <jr...@ATT.COM>.

> -----Original Message-----
> From: ithinkihaveacat@gmail.com [mailto:ithinkihaveacat@gmail.com] On
> Behalf Of Michael Stillwell
> Sent: Wednesday, January 02, 2008 11:45 AM
> To: users@subversion.tigris.org
> Subject: moving multiple directories: {foo,bar} to quux/{foo,bar}
> 
> Is there a neat way of moving multiple files/directories at once?
> I've been doing something like:
> 
>   $ for d in dir1 dir2 ; do svn mv -m '' $SVNROOT/$d $SVNROOT/quux/$d
;
> done
> 
> but this: (a) creates a revision per directory; (b) requires knowledge
> of the repository URL; and (c) isn't very pretty.
> 
> Basically, is there a subversion equivalent of:
> 
>   $ mv dir1 dir2 quux
> 
> ?  (Or of TortoiseSVN's right-click drag.)
> 

svn co -N $SVNROOT
cd workspace
svn co -N $d  (or is it svn update -N $d?)
svn co -N quux  (or svn update -N ...?)
svn mv blah blah blah to quux
svn ci

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org