Dummy-merging of heads (Was: Improving on branch closing)

Peter Arrenbrecht peter.arrenbrecht at gmail.com
Thu Aug 20 08:35:38 CDT 2009


On Mon, Jul 20, 2009 at 6:23 PM, Martin Geisler<mg at lazybytes.net> wrote:
> 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

Actually, I usually do `hg debugsetparents one two` and then commit to
subsume two in one. Is there a problem with this? Would a patch adding
this as a regular command, like

  hg subsume two (when at one)

be welcome?
-parren

> 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'.



More information about the Mercurial-devel mailing list