Reputation: 648
So the challenge is this:
We have a single SVN repository server, that contains multiple projects:
http://server.com/svn/projectA/trunk
http://server.com/svn/projectA/branches
http://server.com/svn/projectA/tags
http://server.com/svn/projectB/trunk
http://server.com/svn/projectB/branches
http://server.com/svn/projectB/tags
ProjectA and ProjectB are really just components of ProjectX. What everyone wants now is:
http://server.com/svn/projectX/trunk/ProjectA
http://server.com/svn/projectX/trunk/ProjectB
http://server.com/svn/projectX/branches/OldVersion/ProjectA
http://server.com/svn/projectX/branches/OldVersion/ProjectB
http://server.com/svn/projectX/tags/PreMajorChange/ProjectA
http://server.com/svn/projectX/tags/PreMajorChange/ProjectB
I was thinking svndump, but then to recheckin all that data sort means that our revision numbers will exceed 100,000. Not sure that's the best way to go about it (or maybe that's the only way).
Or would be it as simple as svn move?
Upvotes: 1
Views: 124
Reputation: 9715
Use svn move
. It will preserve the history and will increase SVN repository size minimally.
First you checkout the repository at root level, and then do the moves:
mkdir -p projectX/{trunk,branches/OldVersion,tags/PreMajorChange}
svn add projectX
svn move projectA/trunk projectX/trunk/ProjectA
svn move projectA/branches/* projectX/branches/OldVersion/ProjectA
svn move projectA/tags/* projectX/tags/PreMajorChange/ProjectA
svn move projectB/trunk projectX/trunk/ProjectB
svn move projectB/branches/* projectX/branches/OldVersion/ProjectB
svn move projectB/tags/* projectX/tags/PreMajorChange/ProjectB
svn commit . -m "Restructuring"
Try it first on a test repository (for example copy existing one by svnadmin hotcopy
).
Upvotes: 3
Reputation: 2278
I guess you want to preserve the commit history, even not explicitly written?
You can create a new repo for ProjectX, and then link projects A and B into it using svn:externals property. Its like symlinks in a plain FS. you can read a quick sample here.
This is the simpler way as you don't have to do some "dangerous" operations.
Upvotes: 1