Mercurial > hg-stable
diff tests/test-status.t @ 23402:2963d5c9d90b stable
rename: properly report removed and added file as modified (issue4458)
The result of 'hg rm' + 'hg rename' disagreed with the one from
'hg rename --force'. We align them on 'hg move --force' because it agrees with
what 'hg status' says after the commit.
Stopping reporting a modified file as added puts an end to the hg revert confusion in this
situation (issue4458).
However, reporting the file as modified also prevents revert from restoring the copy
source. We fix this in a later changeset.
Git diff also stop reporting the add in the middle of the chain as add. Not
sure how important (and even wrong) it is.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Mon, 24 Nov 2014 18:42:56 -0800 |
parents | eeaed3d2b004 |
children | 0e41f110e69e |
line wrap: on
line diff
--- a/tests/test-status.t Wed Nov 26 14:54:16 2014 -0800 +++ b/tests/test-status.t Mon Nov 24 18:42:56 2014 -0800 @@ -390,3 +390,49 @@ #endif $ cd .. + +Status after move overwriting a file (issue4458) +================================================= + + + $ hg init issue4458 + $ cd issue4458 + $ echo a > a + $ echo b > b + $ hg commit -Am base + adding a + adding b + + +with --force + + $ hg mv b --force a + $ hg st --copies + M a + b + R b + $ hg revert --all + reverting a + undeleting b + $ rm *.orig + +without force + + $ hg rm a + $ hg st --copies + R a + $ hg mv b a + $ hg st --copies + M a + b + R b + +Other "bug" highlight, the revision status does not report the copy information. +This is buggy behavior. + + $ hg commit -m 'blah' + $ hg st --copies --change . + M a + R b + + $ cd ..