diff tests/test-revert.t @ 19129:bd19587a3347 stable

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.
author Bryan O'Sullivan <bryano@fb.com>
date Fri, 03 May 2013 12:40:17 -0700
parents f2719b387380
children 4af19d39706e
line wrap: on
line diff
--- a/tests/test-revert.t	Fri May 03 09:44:50 2013 -0700
+++ b/tests/test-revert.t	Fri May 03 12:40:17 2013 -0700
@@ -275,4 +275,28 @@
   $ hg revert --no-backup ignored removed
   $ hg st -mardi
 
+someone set up us the copies
+
+  $ rm .hgignore
+  $ hg update -C
+  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ hg mv ignored allyour
+  $ hg copy removed base
+  $ hg commit -m rename
+
+copies and renames, you have no chance to survive make your time (issue3920)
+
+  $ hg update '.^'
+  1 files updated, 0 files merged, 2 files removed, 0 files unresolved
+  $ hg revert -rtip -a
+  adding allyour
+  adding base
+  removing ignored
+  $ hg status -C
+  A allyour
+    ignored
+  A base
+    removed
+  R ignored
+
   $ cd ..