Bug 2715 - Lost files on update (windows) (edit)
:
:
Status: RESOLVED FIXED
:
:
:
Assigned To:
Matt Mackall (edit) (take)

(edit)
:
Depends on: (edit)
Blocks: (edit)
  Show dependency treegraph
 
Reported: 2011-03-18 16:38 UTC by Evgeny Vrublevsky
Modified: 2011-03-23 13:00 UTC (History)
5 users (show)

(add)



Attachments
(34 bytes, application/octet-stream)
2011-03-18 16:38 UTC, Evgeny Vrublevsky
Details
(34 bytes, application/octet-stream)
2011-03-21 15:04 UTC, Idan Kamara
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Evgeny Vrublevsky 2011-03-18 16:38:05 UTC
This batch file creates main repository and two clones. Shows the situation
when the upgrade will be lost file. Sorry for my english.
Comment 1 Patrick Mézard 2011-03-21 14:12:20 UTC
Here is the script content for reference:

mkdir c:\work
cd c:\work
mkdir rootrepo
cd rootrepo
hg init
echo test > Test.txt
hg add
hg commit -m "init"
cd ..
hg clone c:\work\rootrepo clone1
hg clone c:\work\rootrepo clone2

cd clone1
echo test2 > Test.txt
hg commit -m "test2"
hg rename Test.txt test2.txt
hg rename test2.txt test.txt
hg commit -m "rename"
hg push
cd ..

cd clone2
echo test3 > Test.txt
hg pull
hg update
Comment 2 Idan Kamara 2011-03-21 15:04:19 UTC
I was able to reproduce this with a smaller script:

hg init test
cd test
echo test > Test.txt
hg add
hg commit -m "init"

hg rename Test.txt test2.txt
hg rename test2.txt test.txt
hg commit -m "rename"
hg upd 0

echo test3 > Test.txt
hg upd

The output of the second 'hg upd' is:
merging Test.txt and test.txt to test.txt
0 files updated, 1 files merged, 0 files removed, 0 files unresolved

But the file is deleted.
Comment 3 HG Bot 2011-03-23 13:00:08 UTC
Fixed by http://selenic.com/repo/hg/rev/5b3383ea67d2
Matt Mackall <mpm@selenic.com>
merge: avoid unlinking destination of merge when case changes (issue2715)

(please test the fix)
Comment 4 Bugzilla 2012-05-12 13:18:25 UTC

--- Bug imported by bugzilla@serpentine.com 2012-05-12 09:18 EDT  ---

This bug was previously known as _bug_ 2715 at http://mercurial.selenic.com/bts/issue2715
Imported an attachment (id=1536)
Imported an attachment (id=1537)