Retroactively merge branches

Nikolaus Rath Nikolaus at rath.org
Sun Jul 4 20:08:13 UTC 2010


On 07/04/2010 03:30 PM, Robert Bauck Hamar wrote:
> *Nikolaus Rath:
> [cut lots of stuff that people shouldn't do unless they know what they
> are doing]
>> 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?
>
> Im guessing rev 231 is a branch head (see "hg help glossary"). If so,
> the easiest way to remove it from the output of "hg heads" is "hg up -r
> 231" and "hg ci --close-branch", or using "hg heads -t".

Yes, that was it. Thanks!


Is there a way to combine the closing of a branch with merging it? 
Committing the merge with --close-branch fails, but it seems weird to me 
that I have to add an extra head to the branch to close it. Having the 
merge as the last changeset in the branch would in my opinion be much 
more intuitive and natural.


Best,

    -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