[PATCH] merge: give clearer error messages when there is nothing to merge

Matt Mackall mpm at selenic.com
Wed Jun 16 09:13:01 CDT 2010


On Wed, 2010-06-16 at 09:28 -0400, Greg Ward wrote:
> On Tue, Jun 15, 2010 at 6:09 PM, Matt Mackall <mpm at selenic.com> wrote:
> > On Mon, 2010-06-14 at 14:45 -0400, Greg Ward wrote:
> >> @@ -6,5 +6,6 @@
> >>  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
> >>  (branch merge, don't forget to commit)
> >>  bogus fast-forward should fail
> >> -abort: can't merge with ancestor
> >> +abort: nothing to merge
> >> +(attempt to merge with an ancestor of the working dir)
> >
> > I'm not sold on this. I think the original message is more to the point.
> > Also, we generally save "(some text)" for advice on how to deal with an
> > issue.
> 
> OK, I'll just come right out and say it boldly: "can't merge with
> ancestor" is *completely incomprehensible* to new users, and somewhat
> confusing to experienced users.

> The first time I saw it, I had no idea what it meant.

How is that possible? You know what an ancestor is and you know what a
merge is. And Mercurial is telling in no uncertain terms that a) you
just tried to do that and b) you can't.

Maybe you're trying to tell me you had no idea -why- it's not allowed.
But I don't think "nothing to merge" gets us a whole lot closer to that,
as you're still left puzzling over why there's nothing to merge when you
clearly just gave it something to merge with. How about:

abort: dude, merging with an ancestor is a pointless no-op (think about
it)

or perhaps:

abort: merging with ancestor has no effect

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list