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

Laurens Holst laurens.nospam at grauw.nl
Wed Jun 16 13:39:11 CDT 2010


Op 16-6-2010 17:00, Mads Kiilerich schreef:
> On 06/16/2010 04:20 PM, Dirkjan Ochtman wrote:
>> On Wed, Jun 16, 2010 at 16:13, Matt Mackall<mpm at selenic.com>  wrote:
>>> abort: dude, merging with an ancestor is a pointless no-op (think about
>>> it)
>
> Perhaps it would be helpful to give the hint that the revisions 
> haven't diverged and that there thus is nothing to merge.
>
> That might be a logical consequence of one being a descendant of the 
> other, but for users not used to graph theory it might not be obvious.
>
>>> or perhaps:
>>>
>>> abort: merging with ancestor has no effect
>>
>> I actually think the latter is an improvement.
>
> Perhaps:
> abort: can't merge with revision (it is already an ancestor)
>
> The opposite message could be:
> abort: can't merge with revision (it is already a descendant - use 'hg 
> update' or check 'hg heads')
>
> That way the comments gives the "you don't want this" advice, either 
> because "you already got it" or "you can get it by updating".

Maybe reverse the statement; instead of saying what is the thing that 
causes the merge to fail, to say what should be the case for doing a 
merge and isn’t.

abort: merge must be with a revision on a different branch

This may be easier to understand for novice users.

~Laurens

-- 
~~ Ushiko-san! Kimi wa doushite, Ushiko-san nan da!! ~~
Laurens Holst, developer, Utrecht, the Netherlands
Website: www.grauw.nl. Backbase employee; www.backbase.com


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5278 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20100616/dc742115/attachment.bin>


More information about the Mercurial-devel mailing list