Shifting SVN dirs around

Dirk Koopman djk at tobit.co.uk
Fri Feb 15 10:28:22 GMT 2008


Simon Wistow wrote:
> Currently I have my SVN repo set up so that trunk is
> 
> 	/simon/<program name>/ 
> 
> and releases are
> 
> 	/simon-releases/<program name>/<version>
> 
> and I've been pondering changing it to the more standard
> 
> 	/simon/<program name>/trunk
>                          /releases/<version>  # or /tags
>                          /branches
> 
> and I've been trying to think of a way to automate it. The best I can 
> come up with is something along the lines of this (in pseudo code)
> 
> 	foreach $name (@all_programs) {
> 		svn mkdir /tmp/$name
> 		svn mv    /simon/$name /tmp/$name/trunk
> 		svn mv    /tmp/$name   /simon/$name
> 		svn mv    /simon-releases/$name /simon/$name/releases
> 		svn mkdir /simon/$name/branches
> 	}
> 
> Is this a completely crazy? Is there a better way of doing this?
> 
>

Er...

Use git/mecurial instead? Tags are then just labels pointing to 
different states of the projects. No directories, no moving and, even 
better, you can change it again if you decide you hate it.


More information about the london.pm mailing list