[PATCH] merge: improve error messages when aborting because of head count

Greg Ward greg-hg at gerg.ca
Mon Jun 14 16:49:22 CDT 2010


On Mon, Jun 14, 2010 at 5:13 PM, Matt Mackall <mpm at selenic.com> wrote:
> Still don't get why you think -t is the right thing here. Topological
> heads does not include all the heads on other branches.

Partly local prejudice.  When I run "hg heads" in our big production
repo, I get 112 branch heads, around 105 of which are boring ancient
history.  Example:

"""
changeset:   109492:9a4a38b18ce7
tag:         tip
user:        ...
date:        2010-06-14 13:57:45 -0400
summary:     21282 fix: controlTomcat now exits with an error message
if run as root.

changeset:   109490:997bb87a6b2e
branch:      PACS-4-1-2
parent:      109485:2995d63d4c28
parent:      109489:01c5d3c20f2f
user:        ...
date:        2010-06-14 13:16:10 -0400
summary:     28370 fix,28211 fix: merge from PACS-4-1-1

changeset:   109489:01c5d3c20f2f
branch:      PACS-4-1-1
user:        ...
date:        2010-06-14 13:12:45 -0400
summary:     28211 fix: ims.install.upgrade: exclude autossh and
autossh-intlerad from being killed

[...skip ~93 boring old branch heads to get to the oldest release branch...]

changeset:   13169:fb6749900aba
branch:      PACS-2-2-3
tag:         PACS-2-2-3-last-cvs
parent:      12214:91adad333e10
user:        ...
date:        2003-03-05 15:39:53 -0500
summary:     3075 fix: if we are using msql, strip the trailing backslash

changeset:   13167:f18abcebb8c1
branch:      PACS-2-1-9
tag:         PACS-2-1-9-last-cvs
parent:      12213:f492322a6a6d
user:        ...
date:        2003-03-05 15:35:24 -0500
summary:     3075 fix: if we are using msql, strip the trailing backslash

[...skip another 10 heads of ancient CVS development branches...]

changeset:   4542:888504017e59
branch:      BRANCH-SLIP-1142-B1
parent:      4540:806d973c6b8b
user:        ...
date:        2002-02-21 13:56:38 -0500
summary:     1153 ongoing: added debugging and fixed typo.
"""

It's 2010.  I am very unlikely to be interested in merging with a
branch head from 2002.  Especially one where the developer committed
bug 1153 on a branch named for bug 1142.  ;-)  (Thankfully, the idea
of doing per-bug branches with CVS did not last very long around here,
but my conversion from CVS faithfully preserved them.)

And keep in mind that I ruthlessly purged *really* uninteresting
branches in the conversion from CVS; if I had not done that, we would
have ~160 branch heads.

Also, there's a more general principle: if a branch head is no longer
a repo head, then it's just not as interesting: either it has been
merged to another branch or it has been covered up by commits on
another branch. Either way, you should probably be looking at that
other branch, which might just have an actual repo head that might be
more interesting.

Greg


More information about the Mercurial-devel mailing list