[PATCH RFC] update: default update should move as far forward as possible (issue3883)

Matt Mackall mpm at selenic.com
Thu Apr 11 15:15:13 CDT 2013


On Thu, 2013-04-11 at 17:23 +0000, Durham Goode wrote:
> On 4/10/13 5:17 PM, "Matt Mackall" <mpm at selenic.com> wrote:
> 
> >On Wed, 2013-04-10 at 20:24 +0000, Durham Goode wrote:
> >> On 4/10/13 1:22 PM, "Augie Fackler" <raf at durin42.com> wrote:
> >> 
> >> >On Wed, Apr 10, 2013 at 12:55:39PM -0700, Durham Goode wrote:
> >> >>
> >> >> o  3
> >> >> |
> >> >> | o  2
> >> >> | |
> >> >> | @  1
> >> >> |/
> >> >> |
> >> >> o  0
> >> >>
> >> >> 'hg update' will now put you on commit 2.  If you were already on
> >> >>commit 2,
> >> >> it would be a no-op.  If you were on commit 0, it would put you on 3.
> >> >
> >> >Where would it put you before this change?
> >> 
> >> It would give you an error "abort: crosses branches" because it tried to
> >> go to 3.
> >
> >So.. user on 2 will now be given the false impression they were
> >up-to-date? Prepare for a flood of "where did my incoming changes go?"
> >or even more clueless bug reports.
> >
> >It's underspecified here whether you're talking about this being
> >bookmark-specific behavior, and it seems from the patch that it's not.
> >It's definitely not the right answer if there are no bookmarks involved.
> 
> To better specify: this change is not bookmark specific. It always applies.
> 
> If a user sees "abort: crosses branches" they're going to have to
> investigate anyway to learn why it failed.  That same investigation holds
> true with my change if hg update reports nothing changed.

First, I'm happy to agree that the old message sucks. But it does tell
the user that a) they have an issue and b) it's somehow related to
branching. 

But "hg update" doing this:

 $ hg update
 0 files updated, 0 files merged, 0 files removed, 0 files unresolved

says "everything's fine" to all but the most clueful, attentive users.
We have maybe a dozen of those. The average user instead has only the
vaguest idea of how the DAG works (ie "it's magic") and it's not going
to occur to them to merge[1] unless you give them a big fat hint.
Instead, they'll keep working for a few days and then wonder why they
didn't get any of the bugfixes they were supposed to. 

[1] what typical non-expert, non-bookmark-and-rebase workflows should
probably do here

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list