Bugzilla – Bug 2715
Lost files on update (windows)
Last modified: 2011-03-23 13:00:08 UTC
This batch file creates main repository and two clones. Shows the situation when the upgrade will be lost file. Sorry for my english.
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
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.
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)
--- 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)