[issue3113] update leaves working directory in funny state when interrupted or aborted
Greg Ward
bugs at mercurial.selenic.com
Fri Nov 18 17:54:56 UTC 2011
New submission from Greg Ward <greg-hg at gerg.ca>:
When "hg update" is interrupted by the user (Ctrl-C) or crashes because of
an abort halfway through, it leaves the working dir in a bad state: half the
files are from the changeset we were updating to, and half are from the old
changeset. This can be confusing for updates spanning a lot of changes:
"hey, what the heck are these 900 modified files from... and the
modifications are all things that were committed months ago! WTF?!?"
Given that filesystems are not atomic and update can crash no matter how
hard we try (kill -9, pull the power plug), this behaviour is technically
unfixable. But I think we can improve the user's experience:
* when starting update, write a file in .hg that records the fact
that update is running (or, better, write the fact that we are
updating from REV1 to REV2 -- might come in handy later)
* when update completes, remove that file
* if the "updating" file is present when hg starts (probably when we
open the repo?), print a big noisy warning -- or maybe even abort
-- telling the user they should rerun "hg update REV2" to finish
the job
----------
messages: 18115
nosy: gward
priority: feature
status: unread
title: update leaves working directory in funny state when interrupted or aborted
____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue3113>
____________________________________________________
More information about the Mercurial-devel
mailing list