TiernanO
TiernanO

Reputation: 1607

moving from one SVN folder structure to another

We have an SVN Server with a folder structure as follows:

/svn/CompanyName/Trunk/Project

where company name is the project everything gets checked into, everything is in the trunk and each project has a folder... in some cases, we have projects which have a v2 or v3 after them... this was set up about 5 or 6 years ago and i kind of took it on last year...

part of my upgrade plan is to move stuff around so we have the following structure:

/svn/projectname/(trunk|tags|branches)/

the plan would be to take all files from the latest release of a project and place it into the trunk, and if there is a v2 or v1 of a project, put them in their own branch...

so far, i have figured out how to get svnadmin dump and svndump-filter working to get me a particular folder (so, svn/companyname/trunk/project1) and got 2 tests projects out (projectv1 and projectv2). now i need to tell project v1 to import into project/branch/v1 and tell project v2 to import into /project/trunk...

any ideas, other than messing directly with the dump file, on how to rename folders and keep the history?

Upvotes: 0

Views: 798

Answers (2)

TiernanO
TiernanO

Reputation: 1607

looking around, based on the comment @malenkiy_scot made about editing the file, i found an article on the openSUSE lizards site about merging SVN Repositories. this seems to do what i need it to do, including the renaming of folders, merging of dump files, etc...

Upvotes: 0

malenkiy_scot
malenkiy_scot

Reputation: 16615

According to the definitive SVN reference tweaking the dump file is the way to go:

At this point, you have to make a decision. Each of your dump files will create a valid repository, but will preserve the paths exactly as they were in the original repository. This means that even though you would have a repository solely for your calc project, that repository would still have a top-level directory named calc. If you want your trunk, tags, and branches directories to live in the root of your repository, you might wish to edit your dump files, tweaking the Node-path and Node-copyfrom-path headers so that they no longer have that first calc/ path component. Also, you'll want to remove the section of dump data that creates the calc directory.

Upvotes: 2

Related Questions