diff tests/test-status.t @ 29000:2d3837a4bded stable

log: fix status template to list copy source per dest (issue5155) Before, copied files were assumed as "A" (added) and listed followed by non-copy added files. This could double entries of a copy if it had "M" (modified) state. So, this patch makes the template check if a file is included in copies dict. This way, entries should never be doubled. The output of "log -Tstatus -C" does not always agree with "status -C --change" due to the bug of "status", which is documented in test-status.t. See also 2963d5c9d90b.
author Yuya Nishihara <yuya@tcha.org>
date Thu, 24 Mar 2016 22:55:56 +0900
parents 215b47449e47
children 6a98f9408a50
line wrap: on
line diff
--- a/tests/test-status.t	Wed Apr 20 16:33:13 2016 +0100
+++ b/tests/test-status.t	Thu Mar 24 22:55:56 2016 +0900
@@ -513,6 +513,18 @@
   M a
   R b
 
+using log status template (issue5155)
+  $ hg log -Tstatus -r 'wdir()' -C
+  changeset:   2147483647:ffffffffffff
+  parent:      0:8c55c58b4c0e
+  user:        test
+  date:        * (glob)
+  files:
+  M a
+    b
+  R b
+  
+
 Other "bug" highlight, the revision status does not report the copy information.
 This is buggy behavior.
 
@@ -521,4 +533,17 @@
   M a
   R b
 
+using log status template, the copy information is displayed correctly.
+  $ hg log -Tstatus -r. -C
+  changeset:   1:6685fde43d21
+  tag:         tip
+  user:        test
+  date:        * (glob)
+  summary:     blah
+  files:
+  M a
+    b
+  R b
+  
+
   $ cd ..