test-revert: add case where the file is removed between "base" and "parent"
authorPierre-Yves David <pierre-yves.david@fb.com>
Fri, 27 Jun 2014 18:01:16 +0200
changeset 22136 a29574cb8552
parent 22135 37d2bd2c04f6
child 22137 2cfe5ec47803
test-revert: add case where the file is removed between "base" and "parent"
tests/test-revert.t
--- a/tests/test-revert.t	Fri Jun 27 18:00:49 2014 +0200
+++ b/tests/test-revert.t	Fri Jun 27 18:01:16 2014 +0200
@@ -441,6 +441,8 @@
   >     'modified': ['base', 'parent'],
   >     # added: file is missing from base and added in parent
   >     'added': [None, 'parent'],
+  >     # removed: file exist in base but is removed from parent
+  >     'removed': ['base', None],
   > }
   > 
   > # content of file in working copy
@@ -494,6 +496,7 @@
   added_clean
   clean_clean
   modified_clean
+  removed_clean
 
 Script to make a simple text version of the content
 ---------------------------------------------------
@@ -522,9 +525,11 @@
   $ hg addremove --similarity 0
   adding clean_clean
   adding modified_clean
+  adding removed_clean
   $ hg status
   A clean_clean
   A modified_clean
+  A removed_clean
   $ hg commit -m 'base'
 
 (create a simple text version of the content)
@@ -533,15 +538,18 @@
   $ cat ../content-base.txt
   base   clean_clean
   base   modified_clean
+  base   removed_clean
 
 Create parent changeset
 
   $ python ../gen-revert-cases.py parent
   $ hg addremove --similarity 0
   adding added_clean
+  removing removed_clean
   $ hg status
   M modified_clean
   A added_clean
+  R removed_clean
   $ hg commit -m 'parent'
 
 (create a simple text version of the content)
@@ -561,6 +569,7 @@
   $ hg status --rev 'desc("base")'
   M modified_clean
   A added_clean
+  R removed_clean
 
 (create a simple text version of the content)
 
@@ -607,6 +616,7 @@
   $ hg revert --all --rev 'desc(base)'
   removing added_clean
   reverting modified_clean
+  adding removed_clean
 
 Compare resulting directory with revert target.
 
@@ -643,6 +653,9 @@
   ### revert for: modified_clean
   no changes needed to modified_clean
   
+  ### revert for: removed_clean
+  removed_clean: no such file in rev * (glob)
+  
 
 check resulting directory againt the --all run
 (There should be no difference)
@@ -680,6 +693,8 @@
   
   ### revert for: modified_clean
   
+  ### revert for: removed_clean
+  
 
 check resulting directory againt the --all run
 (There should be no difference)