how to restore file deleted with "update -C"
Robert Bauck Hamar
r.b.hamar at usit.uio.no
Mon Feb 14 11:55:13 UTC 2011
*Lasse Vågsæther Karlsen:
>On Mon, Feb 14, 2011 at 11:07, plumo <richardbp at gmail.com> wrote:
>
>>
>> hello,
>>
>> I have accidentally deleted a file with mercurial and am wondering if it is
>> possible to restore it.
>> Here is my log:
>>
>...
>
>>
>> $ hg update -C
>> removing main.py
>> 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
>>
>>
>> Now my main.py file is deleted. Not just removed from repository but
>> deleted
>> from file system! Very frustrating!
>> Is there any way to restore it from mercurial's meta data?
>>
>If the file was not tracked by Mercurial at this point, no, there is no way
>through Mercurial to get the file back.
>
>"hg update -C" *specifically* says "discard uncommitted changes (no backup)"
>in the help text.
Fortunately, not even hg update -C will touch untracked files (unless
the revision we're updating to has a file with the same name). The fact
that main.py was removed, indicates that not all hope is gone.
--
Robert Bauck Hamar
USIT/SAPP/GT - Cerebrum
http://www.uio.no/sok?person=hamar
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20110214/48976860/attachment.asc>
More information about the Mercurial
mailing list