You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Faried Nawaz <fn...@hungry.org> on 2002/06/25 07:48:35 UTC

combining repositories.

Let's say I have two separate repositories with different projects.
Can I move a project from one repo to another?  The CVS equivalent is
cp -pr /repo1/dir /repo2/dir (you get to merge CVSROOT manually).

svn cp doesn't quite do this.


Faried.
-- 
The Great GNU has arrived, infidels, behold his wrath !
If I wanted a GF,                Values, not variables.
   I'd use Dylan.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: combining repositories.

Posted by Faried Nawaz <fn...@hungry.org>.
Greg Stein wrote:

  You can certainly import one project into another. The files in the new
  project won't retain their history, however (that is still back in the
  original repository).

Yeah, I wanted to avoid losing the history.

I suppose I could hack together a script to

- checkout repo-1/project/trunk
- svn log > /tmp/blah
- checkout -r 0, import that into repo-2/project/trunk
- checkin -r 0 to -r 1 into repo-2/project/trunk, use the appropriate log entry
- repeat

Hackish, but an option.


Faried.
-- 
The Great GNU has arrived, infidels, behold his wrath !
If I wanted a GF,                Values, not variables.
   I'd use Dylan.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: combining repositories.

Posted by Greg Stein <gs...@lyra.org>.
On Tue, Jun 25, 2002 at 12:48:35AM -0700, Faried Nawaz wrote:
> Let's say I have two separate repositories with different projects.
> Can I move a project from one repo to another?  The CVS equivalent is
> cp -pr /repo1/dir /repo2/dir (you get to merge CVSROOT manually).
> 
> svn cp doesn't quite do this.

You can certainly import one project into another. The files in the new
project won't retain their history, however (that is still back in the
original repository).

One day, we might enable 'svnadmin load' to load a dumpfile with a specified
prefix. That would enable merging of repositories.

In any case, the magic incantation is something like this:

$ svn co Some/URL/repo1
$ svn import Some/URL/repo2 repo1/dir newdir

That will import repo1/dir into repo2 as "repo2/newdir". Basically, you're
getting all the code onto your local machine, and then importing it up into
the repo2 repository.

[ note that a local working copy is needed. you cannot import from one
  repository directly to another ]

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org