Combining repos

Daniel Holth dholth at fastmail.fm
Thu Jun 21 23:17:40 UTC 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Brendan Cully wrote:
> On Thursday, 21 June 2007 at 19:04, Steve Greenland wrote:
>> Is there any way to convert an existing mercurial repo to be a
subdirectory
>> of newer repo? For example, given the directory
>>
>>    /something/foo/bar/baz
>>
>> I original created a repo in baz. Later, I realized I wanted to VC
>> all of /something/foo. I can (and did) create the new repo, which
>> (understandably) skipped over the baz subdir.
>>
>> What I'd like to do now is bring the baz subdirectory, with its history,
>> into the higher-level repo. The bundle/unbundle combo doesn't seem to
>> provide anyway to "re-root" the bundle's path; that is, it just creates
>> the contents of baz in the repo root.
>>
>> Hmmm, it looks like the transplant extension might work, with a filter.
>> Any comments/confirmation?
>
> I've used it for that myself. But it probably won't do the right thing
> if the repo you're importing (the subdir) has merges.
> _______________________________________________
> Mercurial mailing list
> Mercurial at selenic.com
> http://selenic.com/mailman/listinfo/mercurial
Haven't you heard of the coolest merge ever?

Just use "hg mv" to move everything in the old repository into the
desired subdirectory name, "cd new ; hg pull -f old"; "hg merge". The
combined repository will have two root revisions.

- - Daniel
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGewcTVh4W2pVfoMsRAkagAJ9w6MJutnShP8S8QdPtBiPclcVRDwCg62sb
sE7fWJov8yuUcmrLXLhwiYw=
=mXtl
-----END PGP SIGNATURE-----




More information about the Mercurial mailing list