Bug 2282 - "hg revert" should use rename(2)
Summary: "hg revert" should use rename(2)
Status: RESOLVED FIXED
Alias: None
Product: Mercurial
Classification: Unclassified
Component: Mercurial (show other bugs)
Version: unspecified
Hardware: All All
: normal feature
Assignee: Bugzilla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-12 08:23 UTC by Joerg Sonnenberger
Modified: 2012-05-13 05:11 UTC (History)
5 users (show)

See Also:
Python Version: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joerg Sonnenberger 2010-07-12 08:23 UTC
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.
Comment 1 HG Bot 2010-07-21 02:00 UTC
Fixed by http://hg.intevation.org/mercurial/crew/rev/9e874ee0fe97
(revert: rename original to .orig instead of copying (issue2282))
Comment 2 Bugzilla 2012-05-12 09:10 UTC

--- 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