Combining history of two branches
Greg Ward
greg-hg at gerg.ca
Tue May 5 15:28:43 CDT 2009
On Tue, May 5, 2009 at 8:08 AM, Tom Widmer <tom.widmer at googlemail.com> wrote:
> 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.
Have you tried simply pulling from X into Y? You'll need "pull -f"
because they are unrelated repositories, but that's definitely the
place to start.
Failing that, you could try exporting a series of patches from X and
then importing them to 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?
I do not think that MQ (or rebase for that matter) are relevant. MQ
and rebase are fundamentally history editing tools. You're not
editing history, you're merging two repositories. You can do that
with pull, or with export/import, or with bundle/unbundle.
Greg
More information about the Mercurial
mailing list