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

Tim Delaney tim.delaney at aptare.com
Wed Apr 10 19:27:22 CDT 2013


On 11 April 2013 10:17, 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.
>

Perhaps that could be avoided by a message when updating - something like
"there are more recent divergent heads on the same branch - run hg heads
<branchname>". This would only appear then updating to a changeset that is
a head and has a lower revision than a divergent changeset on the same
named branch. In the above scenario the warning would appear when updating
to rev 2, but not when updating to any of rev 0, 1, or 3.

Tim Delaney
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20130411/2b28e87c/attachment.html>


More information about the Mercurial-devel mailing list