[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: Steve Kelley <skelley_at_sciend.com>
Date: Wed, 28 Apr 2010 09:27:27 -0400

Thanks for the response. This I can do. However, what I want is to get
all of the history etc. into the trunk so that it looks like the
repository was created properly to start with. The svn mkdir and mv
commands do not work in the repository itself, only in the working copy.
Is it possible to re-arrange the existing repository and preserve all of
the history/revisions. Something like:

svnadmin dump proj1 > dumpfile
svnadmin create new/proj1_with_trunk
svnadmin load new/proj1_with_trunk < dumpfile

I have tried the above but can't seem to get the job done. Is there a way?

Ryan Schmidt wrote:
> 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
>
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 9.0.814 / Virus Database: 271.1.1/2838 - Release Date: 04/27/10 02:27:00
>
>

-- 
Steve Kelley
106 Oklahoma Ave.
Oak Ridge, TN 37830
865 482 7131
Received on 2010-04-28 15:28:09 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.