diff tests/test-mv-cp-st-diff.t @ 18136:f23dea2b296e

copies: do not track backward copies, only renames (issue3739) The inverse of a rename is a rename, but the inverse of a copy is not a copy. Presenting it as such -- in particular, stuffing it into the same dict as real copies -- causes bugs because other code starts believing the inverse copies are real. The only test whose output changes is test-mv-cp-st-diff.t. When a backwards status -C command is run where a copy is involved, the inverse copy (which was hitherto presented as a real copy) is no longer displayed. Keeping track of inverse copies is useful in some situations -- composability of diffs, for example, since adding "a" followed by an inverse copy "b" to "a" is equivalent to a rename "b" to "a". However, representing them would require a more complex data structure than the same dict in which real copies are also stored.
author Siddharth Agarwal <sid0@fb.com>
date Wed, 26 Dec 2012 15:04:07 -0800
parents bc694d78d843
children 243ea5ffdf31
line wrap: on
line diff
--- a/tests/test-mv-cp-st-diff.t	Wed Dec 26 15:03:58 2012 -0800
+++ b/tests/test-mv-cp-st-diff.t	Wed Dec 26 15:04:07 2012 -0800
@@ -670,7 +670,6 @@
   
   % hg st -C --rev . --rev 0
   M a
-    b
   R b
   
   % hg diff --git --rev . --rev 0
@@ -728,7 +727,6 @@
   
   % hg st -C --rev . --rev 2
   M a
-    b
   A x/y
   R b
   
@@ -1072,7 +1070,6 @@
   
   % hg st -C --rev . --rev 0
   M a
-    b
   R b
   R c
   
@@ -1148,7 +1145,6 @@
   
   % hg st -C --rev . --rev 2
   M a
-    b
   A x/y
   R b
   R c