Improving on branch closing

Martin Geisler mg at lazybytes.net
Mon Jul 20 11:23:58 CDT 2009


Dirkjan Ochtman <dirkjan at ochtman.nl> writes:

> So in converting the Python repository (which has a bunch of named
> branches, many of which have been deleted), I've run into something
> stupid that comes with the way we do branch closing (namely, putting
> 'close': 1 in the extra closes the branch head for the branch that
> that extra belongs to): by default, it leaves the closing branchhead
> as a head in the changelog graph. This sucks because Mercurial has a
> bunch of corners with an O(heads) factor in them. Another oddity is
> that activeness (having unmerged branchheads) and closedness are
> completely separate notions.

I'm not using named branches myself, but I agree that having two ways to
"kill" a branch is bad.

> So, I was wondering, wouldn't it be better to allow branchhead closing
> only in merge changesets? [...]

As I understand it, people disliked having to merge a branch with
another branch in order to get rid of it in 'hg branches --active',
i.e., to make it inactive. So I don't think they would like having to do
a merge to close a branch.

But perhaps people didn't like the merge because you had to do it as

  hg update -C default
  HGMERGE=internal:local hg merge foo

(or something like that) in order to make a branch 'foo' inactive. If it
had instead been

  hg update -C default
  hg branch --make-inactive foo

with an automatic commit as for 'hg tag', then people might have felt
different. Looking at their repository graph, I hope they would think
"okay, my branch is now superseded by 'default', fair enough."

The --active flag should then of course also be default for 'hg
branches'.

-- 
Martin Geisler

VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://selenic.com/pipermail/mercurial-devel/attachments/20090720/c11b7e93/attachment.pgp 


More information about the Mercurial-devel mailing list