Pulling out directory

Adrian Klaver adrian.klaver at gmail.com
Tue Jan 22 03:45:30 UTC 2013


On 01/21/2013 06:52 PM, Eric Siegerman wrote:
> You can get the directory's history into the new repo -- something along
> the lines of:
>    1) use "hg convert" to split the directory out into its own little
> repo -- but put it, within that little repo, *not* at the root, but
> rather at the relative pathname you want it to end up in in the final repo
>    2) use "hg pull --force" to get the little repo that you created at
> step #1 into the final repo
>    3) at this point, the final repo has two completely unrelated DAGs in
> it; use "hg merge" to tie them together
>
> You'll get a history something like this (left column is the stuff that
> was already in the new repo; right column is the directory you've just
> pulled in and merged):
>
> o
> |\
> | \
> |  \
> |  o
> |  |
> |  o
> |  |
> |  o
> |
> o
> |
> o
> |
> o
>
> What I don't know is how to coalesce the two histories back together as
> though they'd never been split up in the first place. You could get a
> crude approximation, though (with a fair bit of manual effort) using
> http://wiki.monotone.ca/ZipperMerge/ .

Thanks for the link, I will investigate. Seems there should be a way 
since there is a fairly recent common history. At this point it more 
academic interest then a compelling need.

>
>    - Eric


-- 
Adrian Klaver
adrian.klaver at gmail.com



More information about the Mercurial mailing list