[issue1074] Need better way to close dead branch

Gerardo Curiel mercurial-bugs at selenic.com
Thu Apr 3 16:35:45 CDT 2008


New submission from Gerardo Curiel <gcuriel at gmail.com>:

This is debian bug [0]referred to the current way to close a dead branch.

I've seen the PruningDeadBranches page of the wiki, and it doesn't seem to be a
clean way to achieve that.

Here's the full text of the report:

"
The existing procedure for removing a dead branch
is confusing and risks major damage to the main branch.

As recommended in the mercurial web pages, you
merge with the dead branch, then
un-do the changes.     This works, at least in
uncomplicated cases but it has some drawbacks.

1) The merge can (and typically does) bring up a GUI tools
with all kinds of complicated options and choices.
The correct action is not at all obvious.
What does one do with conflicts?   Does it matter?

2)The risk is large because you are intentionally
(though temporarily) messing up your best code,
merely to get rid of an annoying obsolete branch.

3) Suppose you get interrupted in between the merge and
the undo?   This isn't a theoretical question.   It
happened to me:   I was sitting there looking at the
GUI merge and wondering what to do, when my phone went
off and I just had to lock the screen and run.

4) It leads to a misleading graph of branches on
hg view (and other misleading status information elsewhere).
It *looks* as if you merged with the branch, but really,
you took no information from it.   Really, it has been
dropped from consideration, but it looks like it was used.
(This is not good practice.)

So, I'd strongly suggest adding a special-purpose
"hg drop" command that causes the named branch to be
ignored (unless explicitly referenced).    It should
be reported as dropped in hg view and hg log.
It should be a atomic operation with no options other
than the selection of a branch to drop.
Perhaps it would be good to have a "-m" option so
you could enter a comment about *why* it was dropped.
"


[0] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=466003
[0] http://www.selenic.com/mercurial/wiki/index.cgi/PruningDeadBranches

----------
messages: 5815
nosy: gerardo
priority: bug
status: unread
title: Need better way to close dead branch
topic: named branches

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



More information about the Mercurial-devel mailing list