[PATCH 1 of 2] rebase: improve error and debug messages

Sune Foldager cryo at cyanite.org
Tue Oct 13 04:18:46 CDT 2009


Timeless wrote:

>> -            raise util.Abort(_('cannot rebase an ancestor'))
>> +            raise util.Abort(_('source is ancestor of destination'))

> i'm not a fan of 'source' or 'ancestor'
> "new parent changeset is derived from the changeset you're trying to move"

Sure, but it seems to go a bit against the trend in Mercurial error messages, which tend
to be concise and not use a lot of 'the', 'of the' and such. I am not against more verbose
responses (although 'rebase' is probably better than 'move').

But what's wrong with the current message? Source matches the argument (--source), and
ancestor should be clear enough, I think.

>>         if commonbase == repo[dest]:
>> -            raise util.Abort(_('cannot rebase a descendant'))
>> +            raise util.Abort(_('source is descendant of destination'))

> I don't get this.

Due to rebase using the merge logic to do its work, rebasing 'backwards' is not possible.

> Would it be unreasonable for me to ask for inline comments showing
> pictures of the scenarios that rebase doesn't like for these cases?
> Then I'd have some way of understanding the errors.

Yeah, I suppose that could be done :-).

/Sune





More information about the Mercurial-devel mailing list