[PATCH 0 of 8 RFC] Add guard option to update, which aborts if the update is unsafe

Martin Geisler mg at lazybytes.net
Thu Jan 5 09:41:26 CST 2012


Laurens Holst <laurens.nospam at grauw.nl> writes:

> Hi Dennis,
>
> Op 27-12-2011 12:05, Dennis Brakhane schreef:
>> On Thu, Dec 22, 2011 at 1:24 AM, Laurens Holst<laurens.nospam at grauw.nl>  wrote:
>>> The driving factor here is really that because you have unversioned changes
>>> in your local working copy, Mercurial should tread extra carefully. The
>>> default behaviour of update is I think too destructive in some situations,
>>> and I would like to have access to a safer version.
>> Just to be sure: are you aware that hg stores a copy of the original
>> files before
>> merging, and you can always get them back and re-merge using "hg
>> resolve -u" followed
>> by "hg resolve"?
>
> I had seen the code, but to be honest I didn’t realise this :) so
> thanks for pointing it out.
>
> However it does not really help much, there is still no way to easily
> go back to the working copy state before the update, especially not
> when files were moved or deleted.

I would think that 'hg resolve --tool internal:local' will handle those.

> There are also some .orig files created containing old file contents,

True, but I'm fine with the .orig files being around. I think people
should just ignore them.

> but reconstructing all of this back to a pre-update working copy
> involves a lot of nontrivial interaction.

Did we not discuss this recently -- as in here:

  http://markmail.org/message/izeibc7ixlwehwuf

I suffer from a bad cold right now, so I'm probably not thinking too
clearly, but what's missing from the 'hg resolve' recipe I give in that
mail?

-- 
Martin Geisler

Mercurial links: http://mercurial.ch/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20120105/c60be0e8/attachment.pgp>


More information about the Mercurial-devel mailing list