Heads from merged branches

anatoly techtonik techtonik at gmail.com
Sun Dec 1 22:42:13 UTC 2013


On Mon, Dec 2, 2013 at 1:35 AM, Christophe HENRY <listes at sbgodin.fr> wrote:
> Le Mon, 2 Dec 2013 01:21:01 +0300
> anatoly techtonik <techtonik at gmail.com> a écrit :
>
>> On Mon, Dec 2, 2013 at 1:07 AM, Christophe HENRY <listes at sbgodin.fr>
>> wrote:
>> > Le Mon, 2 Dec 2013 00:51:39 +0300
>> > anatoly techtonik <techtonik at gmail.com> a écrit :
>> >
>> >> I am using Mercurial 2.6.3 on Ubuntu. Why it keeps showing me
>> >> commit from inactive merged branch in heads? Is it really
>> >> necessary, or a bug?
>> >
>> > You want to view topological heads, that is heads without children.
>> > For this, type in: hg head --topo
>> >
>> > More info with: hg help head
>>
>> This is confusing.
>> If you need to know about active branches, you use branches command.
>> I can understand heads that were not merged back, but why heads shows
>> branches that were merged? Is it really necessary to have this
>> default behaviour?
>
> I can't see the whole picture. But, as far as I know, branches in Hg
> don't die on merge. As the branch info belongs to each commit, even
> the last one, merged, still belongs to its branch. As such, it has no
> child **inside the branch**.
>
> The workaround is to declare the branch closed in the merge
> commit. Using "hg commit --close-branch" will make the branch
> disappear from the "hg branch" output. In addition to this, the
> command "hg heads --closed" will show the closed branch as well.

I don't want to close branches. I want them to show in `branches` command
without any additional switches so that I can switch to them when needed.
The confusing part is heads output. Is it possible to change the default
behaviour to be basic --topo stuff?



More information about the Mercurial mailing list