inconsistency between pull -u and update

Brendan Cully brendan at
Mon May 30 18:11:50 CDT 2011

On 2011-05-30, at 3:53 PM, Benoit Boissinot wrote:

> On Mon, May 30, 2011 at 12:29 AM, Brendan Cully <brendan at> wrote:
>> Why is it that 'hg update' will pick the tipmost head of the current
>> named branch, but 'hg pull -u' will bail out if there is more than one
>> head? For clarity, I have a shell demonstration below.
>> The pull -u behaviour makes more sense to me. If the behavior should
>> be the same, maybe we should push the logic for picking the right
>> revision into hg.update or merge.update?
> This was changed (unintentionally) in
> Probably too late to change it now?
> In fact I don't think it works like you describe it, we don't abort
> because there are several heads, but because the pull added new heads.

You're right. If I pull -u, I can get a failure that heads or added. If I then add another change to either head in the source, pull -u will succeed the second time.

This seems pretty weird to me. But it's set in stone for backward compatibility?

More information about the Mercurial-devel mailing list