[issue1856] hg update doesn't always restore files

Eric Haszlakiewicz bugs at mercurial.selenic.com
Mon Oct 5 21:59:28 UTC 2009


New submission from Eric Haszlakiewicz <ehaszla at transunion.com>:

Running hg update when there are new revisions to update applies any
necessary changes and restores any missing files.  However, if there aren't
any revision changes, it doesn't restore missing files.  This makes it very
difficult to get those files back.

i.e.:
hg init foo
cd foo
echo foo > file1
hg add file1
hg ci -m blah file1
rm file1
hg up  # Nothing happens here

cd ..
hg clone foo bar
cd bar
echo bar > file2
hg add file2
hg ci -m blah file2
hg push
cd ../foo
hg up   # At this point file1 gets restored


In this simple test case I can run "hg update -C", but that is not an option
most of the time when I have changes that I'm in the middle of working on
that I need to keep.

----------
messages: 10672
nosy: erh
priority: bug
status: unread
title: hg update doesn't always restore files

____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue1856>
____________________________________________________



More information about the Mercurial-devel mailing list