Combining repos
Paul Moore
p.f.moore at gmail.com
Sat Jun 23 09:42:12 UTC 2007
On 22/06/07, Daniel Holth <dholth at fastmail.fm> wrote:
> 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.
I'm having a bit of trouble following this. Could you give a step by
step example? To get the OP's setup, I did:
>mkdir foo
>mkdir foo\bar
>mkdir foo\bar\baz
>cd foo\bar\baz
>hg init
>echo Hello >a
>hg add a
>hg commit -m "Added a"
>cd ..\..
>hg init
Now I have
>hg status bar\baz\a
? bar\baz\a
Is the following what you meant?
>hg mv bar\baz\a bar\baz
bar\baz\a: not copying - file is not managed
abort: no files to copy
>hg add bar\baz\a
>hg status bar\baz\a
A bar\baz\a
>hg pull -f bar\baz
pulling from bar\baz
requesting all changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files
(run 'hg update' to get a working copy)
>hg merge
abort: there is nothing to merge - use "hg update" instead
>hg update
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
>hg status bar\baz\a
A bar\baz\a
Thanks,
Paul
More information about the Mercurial
mailing list