[issue1895] Closed branch still shown in general heads list

Jesse Glick bugs at mercurial.selenic.com
Mon Nov 2 16:50:54 UTC 2009


New submission from Jesse Glick <jesse.glick at sun.com>:

---%<---
$ hg init
$ touch f
$ hg add f
$ hg ci -m init
$ hg branch foo
marked working directory as branch foo
$ echo >>f
$ hg ci -m foo
$ hg ci -m close-foo --close-branch
$ hg heads
changeset:   2:ff8e5a849660
branch:      foo
tag:         tip
user:        ...
date:        ...
summary:     close-foo

$ hg branches
default                        0:a324bd1315ed (inactive)
$ hg up default
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ echo >>f
$ hg ci -m trunk
created new head
$ hg heads
changeset:   3:d63ffb65d015
tag:         tip
parent:      0:a324bd1315ed
user:        ...
date:        ...
summary:     trunk

changeset:   2:ff8e5a849660
branch:      foo
user:        ...
date:        ...
summary:     close-foo

$ hg heads foo
no open branch heads on branch foo
---%<---

Say you have created a named branch, but never wish to merge it back to
default (for example, you do not want these changesets appearing when
someone runs 'hg clone -r default'). Using --close-branch you can hide it by
default from 'hg branches'. But there is no apparent way to hide it by
default from 'hg heads'; it will show up as noise forever.

Note that 'hg heads <BRANCH>' does hide closed heads as expected. I would
expect plain 'hg heads' to do the same, where 'hg heads --closed' could be
used if you really wanted to see heads of closed branches.

----------
messages: 10865
nosy: jglick
priority: bug
status: unread
title: Closed branch still shown in general heads list
topic: 1.3.1, named branches, ui

____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue1895>
____________________________________________________



More information about the Mercurial-devel mailing list