Combining history of two branches

Tom Widmer tom.widmer at googlemail.com
Tue May 5 07:08:01 CDT 2009


I have two unrelated (in HG terms) repositories:
X (77MB) has 500 revisions, 4 named branches (all branched after r10)
Y (466 MB) has 20000 revisions, completely linear history (no branches 
or merges)

The tip of Y has an *identical* working tree to X at 10.

I want to create a new repository Z. Z will replace X1..10 with the much 
more exciting history of Y1..20000, thus allowing log and annotate to 
provide the full, rich history, rather than the truncated version from 
X. How do I create Z? In effect, I have to replay X11..500 on top of Y.


Will MQ allow me to do this (noting that the repositories are 
unrelated)? Can it cope with the 4 named branches that need to be 
replayed, or I need to split things up into multiple repositories first? 
How?

Alternatively, if that is too hard or impossible, I would be happy with 
a history like this:

X at 1 - ... - X at 10             -Z at 20490 (tip)
                \           / Z at branch1
                 Zxxx - ... - Z at branch2
                /           \ Z at branch3
Y at 1 - ... - Y at 20000

Can I use rebase to achieve that (again, bearing in mind that X has 4 
named brances)?

Thanks,

Tom



More information about the Mercurial mailing list