Easy repro. First the setup: hg init a cd a echo a>a hg commit -A -m a hg rename a b hg commit -m b Then the bug: hg update 0 hg revert -r 1 -a hg status -C This correctly identifies "a" as removed and "b" as added, but does not indicate that "a" was in fact renamed to "b". So we get this output: A b R a We should have gotten this: A b a R a
Fixed by http://selenic.com/repo/hg/rev/bd19587a3347 Bryan O'Sullivan <bryano@fb.com> revert: ensure that copies and renames are honored (issue3920) Previously, we restored the states of files, but not the additional information the dirstate uses to track copies and renames. (please test the fix)