Problems with "pull --update"
Matt Mackall
mpm at selenic.com
Tue Jan 5 13:16:26 CST 2010
On Tue, 2010-01-05 at 13:50 -0500, Greg Ward wrote:
> I have discovered two problems with "pull --update": one quite
> trivial, one possibly deeper.
>
> 1) I'm pretty sure the help is incorrect: it says
> update to new tip if changesets were pulled
> but shouldn't that be
> update to new branch head if changesets were pulled
> ? Someone tell me I'm wrong, or I'll send a patch. ;-)
Yep, that needs fixing.
> 2) If you're expecting the same behaviour as "hg pull && hg update",
> you're in for a surprise.
> At least this is clearly documented, but it means that users
> coming from CVS or Subversion
> cannot use "hg pull -u" to replace "cvs up" or "svn up". In the
> general case, you have to
> "hg pull ; hg update". ;-(
It has always been thus.
> #2 only occurred to me because I am documenting our new workflow
> (we're moving from CVS), and to make things less painful, I was going
> to try to promote "hg pull -u" as the replacement for "cvs update": do
> it before you start working on a patch, and then again before you
> commit. But it only works as long as you're already at a branch head.
> If you happen to be at an older changeset and nothing gets pulled,
> then you start working at the wrong place. ;-( So it sounds like I
> have to document "hg pull && hg update" as the replacement for "cvs
> update".
>
> If I had a time machine, I would just go back and change it so "hg
> pull --update" did the same as "pull && update", i.e. update
> regardless of whether anything was pulled. But I guess that's against
> the compatibility rules. Darn. Anyone else annoyed by this?
Yes. Here's a crazy idea: add a --pull flag to update.
--
http://selenic.com : development and support for Mercurial and Linux
More information about the Mercurial-devel
mailing list