You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by pl...@lanminds.com on 2003/05/21 19:46:39 UTC
Moving a repo into another?
Hi all,
I have a repository which was, at inception, independant of other
projects. However, now, I need to create a new repository for 2 new
projects. The existing project, however, is now related to these 2
new projects. How can I create the new repository and migrate the
old one into the new one and retain the history?
Here's an example of what I have now:
/usr/local/svn/
projectA
project1
project2
projectA, project1, and project2 are all unrelated. I need to create
projectB and projectC, both of which are related to projectA. I'd
like to create:
/usr/local/svn/
projectALPHA
which will have 3 subdirs, project[ABC] under it, and migrate the
existing projectA to projectALPHA/projectA.
Does that make sense?
Do I want to:
svnadmin create /usr/local/svn/projectALPHA
svn mkdir /usr/local/svn/projectA
svn mkdir /usr/local/svn/projectB
svn mkdir /usr/local/svn/projectC
svnadmin dump /usr/local/svn/projectA | \
svnadmin load /usr/local/svn/projectALPHA/projectA
?
Or is there some other/better way to do this?
Thanks,
--
Seeya,
Paul
--
Key fingerprint = 1660 FECC 5D21 D286 F853 E808 BB07 9239 53F1 28EE
It may look like I'm just sitting here doing nothing,
but I'm really actively waiting for all my problems to go away.
If you're not having fun, you're not doing it right!
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Moving a repo into another?
Posted by Paul L Lussier <pl...@lanminds.com>.
In a message dated: 21 May 2003 14:53:59 CDT
Ben Collins-Sussman said:
>... it's not clear to me, though, how you would load *into* a specific
>directory in the new repository.
projectA is currently it's own repository. It's isolated.
I need to create a new repository with 2 new projects which are each
related to each other *and* to projectA. Basically, I want to move
'projectA' out of it's isolation into a repository with family
members so it's not lonely :) projectA, projectB, and projectC are
all inter-related, and as such, going forward, changesets will
include files in all three trees.
What I seem to need to do is:
svnadmin create /usr/local/svn/projects
svnadmin dump /usr/local/svn/projectA | \
svnadmin load /usr/local/svn/projects
svn create file:///usr/local/svn/projects/projectA
Then 'svn mv' everything from the load under the projectA parent
directory. Does that make sense?
--
Seeya,
Paul
--
Key fingerprint = 1660 FECC 5D21 D286 F853 E808 BB07 9239 53F1 28EE
It may look like I'm just sitting here doing nothing,
but I'm really actively waiting for all my problems to go away.
If you're not having fun, you're not doing it right!
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Moving a repo into another?
Posted by Paul L Lussier <pl...@lanminds.com>.
In a message dated: Wed, 21 May 2003 21:00:13 BST
Philip Martin said:
>svnadmin load --parent-dir foo
>
>foo must exist I believe, so use 'svn mkdir URL' if necessary.
I tried this, and it mostly worked. The problem I had was that
the directory structure of the repo I wished to move was this:
Parent/
file
dir1
dir2
dir3
When I used svnadmin load --parent-dir foo I got:
foo/
dir1
dir2
dir3
But no 'file' for some reason.
I ended up doing:
svnadmin create new-repo
svn mkdir new-repo/subdir
svnadmin dump oldrepo > oldrepo.svn
svn load new-repo < oldrepo.svn
svn co new-repo
cd new-repo
svn mv file subdir
svn mv dir1 subdir
etc.
It worked, and I retained all of my history. It was just a little
more tedious than I would have expected. It appears that the
--parent-dir option mostly works, as long as the parent dir only
contains other subdirs and not files.
--
Seeya,
Paul
--
Key fingerprint = 1660 FECC 5D21 D286 F853 E808 BB07 9239 53F1 28EE
It may look like I'm just sitting here doing nothing,
but I'm really actively waiting for all my problems to go away.
If you're not having fun, you're not doing it right!
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Moving a repo into another?
Posted by Philip Martin <ph...@codematters.co.uk>.
Ben Collins-Sussman <su...@collab.net> writes:
> ... it's not clear to me, though, how you would load *into* a specific
> directory in the new repository.
svnadmin load --parent-dir foo
foo must exist I believe, so use 'svn mkdir URL' if necessary.
--
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Moving a repo into another?
Posted by Ben Collins-Sussman <su...@collab.net>.
pll@lanminds.com writes:
> svnadmin create /usr/local/svn/projectALPHA
> svn mkdir /usr/local/svn/projectA
> svn mkdir /usr/local/svn/projectB
> svn mkdir /usr/local/svn/projectC
> svnadmin dump /usr/local/svn/projectA | \
> svnadmin load /usr/local/svn/projectALPHA/projectA
'svnadmin dump' dumps a set of revisions, and 'svnadmin load' loads
a set of revisions. And a revision is an *entire* tree.
You need to use 'svndumpfilter' to accomplish what you want.
svnadmin dump oldrepo | svndumpfilter | svnadmin load newrepo
The svndumpfilter program filters specific paths in the
dumpstream... so you probably want something like
svnadmin dump oldrepos | svndumpfilter include /usr/local/svn/projectA
... it's not clear to me, though, how you would load *into* a specific
directory in the new repository.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org