Retroactively merge branches

Nikolaus Rath Nikolaus at rath.org
Sun Jul 4 18:42:20 UTC 2010


Hello,

I have two heads in my repository:

changeset:   887:47d333bcfcf3
branch:      llfuse
date:        Wed Dec 30 04:47:06 2009 +0000
description:
Removed whitespace.

changeset:   848:427f10eb24a8
date:        Sun Jul 04 12:18:42 2010 -0400
description:
Factored out thread group handling.

However, the first head is not truly a head but has already been merged
in changeset 194. Mercurial does not know about this, presumably because
the merge was done when the code was still managed with subversion:

changeset:   194:1db152f6144a
date:        Wed Dec 30 04:54:20 2009 +0000
description:
Merged 'llfuse' branch back to trunk.


I tried to fix this as follows:

# Go back to last changeset before merge
hg update -C -r 193

# Redo the merge, this results in changeset 888
hg merge -r 887 --config ui.merge=internal:other
hg commit -m "Merged 'llfuse' branch back to trunk."

# Now move the changesets after the merge onto the new merged changeset
hg rebase --config ui.merge=internal:other --dest 888 --source 195 --detach

# Get rid of the SVN merge changeset
hg strip 194

But for some reason I am still having more than one head:

$ hg heads
changeset:   881:3f897783c963
tag:         tip
date:        Sun Jul 04 12:18:42 2010 -0400
description:
Factored out thread group handling.

changeset:   231:47d333bcfcf3
branch:      llfuse
date:        Wed Dec 30 04:47:06 2009 +0000
description:
Removed whitespace.


However, 231 is not actually a head:

$ hg update -r tip
$ hg merge -r 231
abort: merging with a working directory ancestor has no effect



What's going on here?


Thanks,

   -Nikolaus

-- 
 »Time flies like an arrow, fruit flies like a Banana.«

  PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6  02CF A9AD B7F8 AE4E 425C



More information about the Mercurial mailing list