Test case: mkdir test cd test hg init echo foo > test hg add hg ci -m "test" dd if=/dev/zero of=test seek=1024k bs=1k count=1 hg revert -a Watch hg copying the whole file. It should rename the file. While talking about this on IRC it was mentioned that hardlink breakage might be desirable, so a check for nlinks==1 might be useful.
Fixed by http://hg.intevation.org/mercurial/crew/rev/9e874ee0fe97 (revert: rename original to .orig instead of copying (issue2282))
--- Bug imported by bugzilla@serpentine.com 2012-05-12 09:10 EDT --- This bug was previously known as _bug_ 2282 at http://mercurial.selenic.com/bts/issue2282