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

Re: Rearranging archive

From: Ryan Schmidt <subversion-2010b_at_ryandesign.com>
Date: Tue, 27 Apr 2010 20:54:46 -0500

On Apr 27, 2010, at 18:43, Steve wrote:

> I have inherited an archive

a repository?

> that was created without using the recommended directory structure hosted on a Windows XP box set up with Apache and SSL. Everything works fine except our project is now to the point where I want to start using tags. Since the archives were created without a 'trunk' I don't have a good way to do this. What I would like to do is fix the archive so that the directory structure looks like the recommended. I have not been able to find a way to move the entire repository into a new directory tree so that the code files are in a 'trunk' directory.
>
> What I have now is:
> archive
> proj1
> project files
> proj2
> project files
> etc.
>
> What I want to move to is:
> new archive
> proj1
> trunk
> project files
> tags
> branches
> proj2
> trunk
> project files
> tags
> branches
> etc.
>
> I'm sure I'm trying to make this harder than it actually is but so far I'm striking out.

Yup, it's a simple set of svn mkdir and svn mv commands. Consider this pseudo-bash-code:

foreach PROJECT
        svn checkout url://to/repo/PROJECT
        cd PROJECT
        svn mkdir trunk branches tags
        foreach ITEM that is not trunk branches or tags
                svn mv ITEM trunk
        done
        svn commit -m "create trunk branches tags for PROJECT"
        cd ..
        rm -rf PROJECT
done
Received on 2010-04-28 03:55:19 CEST

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.