[PATCH 3 of 9] update: add error message for dirty non-linear update with no rev
Martin Geisler
martin at geisler.net
Thu Oct 3 12:21:34 UTC 2013
Matt Mackall <mpm at selenic.com> writes:
Hi Matt,
Thanks for the thoughtful answers.
> On Tue, 2013-09-24 at 09:09 +0200, Martin Geisler wrote:
>
>> I almost *never* want to use 'hg update --clean'. It's a bad option
>> since it throws away data. Suggesting that people use 'hg revert'
>> would be better IMHO since that gives them backup files by default.
>
> I think this is fine, as it's explicit that it loses changes. I think
> a lot of people are confused by revert and/or annoyed by orig files so
> it's not clear that suggesting revert would result in a net increase
> in happiness.
Yeah, it's not clear what the wanted action is in all cases and people
are bound to become confused.
>> Further: if I say 'hg update X', and Mercurial aborts, then I must go
>> through the 'hg update "ancestor(., X)"; hg update X' dance. What I
>> really need in that situation is for Mercurial to help me move
>> (merge) them into the target revision. It is extremely rare that I
>> want to throw away my changes with 'hg update --clean'.
>
> Yep. The answer to this might be shelve in the near future.
I'm very happy to see that the extension has been added!
> There have been a couple discussions about a
> --keep-my-changes-across-branch option for update, but they haven't
> gone anywhere. Can't be on by default because hopping branches by
> default is a known cause of user confusion.
Okay, that's fair enough. With the shelve tool I think the need for a
flag has mostly disappeared.
--
Martin Geisler
More information about the Mercurial-devel
mailing list