hg update and deleted files
Tom Karzes
tom.karzes at magnumsemi.com
Fri Jun 18 19:46:59 UTC 2010
That's the work-around for this bug, but the problem is it's completely
manual: Instead of just doing "hg update", you now need to follow up by
doing (1) hg status, then (2) for the files listed as deleted, "hg
revert" each of them. (Doing "hg revert -all" only works if you have no
uncommitted changed, which in general may not be the case.)
People have written wrappers for "hg update" to do just this, all
because of a stupid bug which previously didn't exist. It's very
frustrating.
Tom
________________________________
From: Glenn Hutchings [via Mercurial]
[mailto:ml-node+905147-1505033263-260788 at n3.nabble.com]
Sent: Friday, June 18, 2010 1:53 AM
To: Tom Karzes
Subject: Re: hg update and deleted files
On 31 May, 02:51, Tom Karzes <[hidden email]> wrote:
> With the old version of Mercurial, "hg update" would restore deleted
files.
> The new version does not, unless you specify the "-c" option (i.e.
> "--check"). This option is supposed to give an error if there are
> uncommitted changes, so it almost seems like a bug that it changes the
way
> deleted files are handled. I'm guessing that it happens to detect
them due
> to the additional processing, and as a side effect they get restored
by the
> update.
There's another command called 'revert' which can restore deleted
files. If you were using a very old hg version, you might not have
been aware of it (not sure when it was introduced). Its functionality
overlaps with 'update', but it can operate on individual files,
whereas 'update' is designed to work on the whole repo (and that's
probably why it was created).
_______________________________________________
Mercurial mailing list
[hidden email]
http://selenic.com/mailman/listinfo/mercurial
________________________________
View message @
http://mercurial.808500.n3.nabble.com/hg-update-and-deleted-files-tp8572
61p905147.html
To unsubscribe from hg update and deleted files, click here
<http://mercurial.808500.n3.nabble.com/subscriptions/Unsubscribe.jtp?cod
e=dG9tLmthcnplc0BtYWdudW1zZW1pLmNvbXw4NTcyNjF8MjUyNzY1ODM2> .
--
View this message in context: http://mercurial.808500.n3.nabble.com/hg-update-and-deleted-files-tp857261p906340.html
Sent from the General mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20100618/48f4f623/attachment.html>
More information about the Mercurial
mailing list