changeset 22142:e1a69b0ac9e6

test-revert: add case with untracked files with reverted content This test highlights similar misbehaviors as its parent changesets.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Fri, 27 Jun 2014 18:23:45 +0200
parents 6b522c1139a9
children ca278b893940
files tests/test-revert.t
diffstat 1 files changed, 67 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-revert.t	Fri Jun 27 18:10:45 2014 +0200
+++ b/tests/test-revert.t	Fri Jun 27 18:23:45 2014 +0200
@@ -460,6 +460,7 @@
   > }
   > # untracked-X is a version of X where the file is not tracked (? unknown)
   > wccontent['untracked-clean'] = wccontent['clean']
+  > wccontent['untracked-revert'] = wccontent['revert']
   > 
   > # build the combination of possible states
   > combination = []
@@ -507,26 +508,31 @@
   added_removed
   added_revert
   added_untracked-clean
+  added_untracked-revert
   added_wc
   clean_clean
   clean_removed
   clean_revert
   clean_untracked-clean
+  clean_untracked-revert
   clean_wc
   missing_clean
   missing_removed
   missing_revert
   missing_untracked-clean
+  missing_untracked-revert
   missing_wc
   modified_clean
   modified_removed
   modified_revert
   modified_untracked-clean
+  modified_untracked-revert
   modified_wc
   removed_clean
   removed_removed
   removed_revert
   removed_untracked-clean
+  removed_untracked-revert
   removed_wc
 
 Script to make a simple text version of the content
@@ -558,32 +564,38 @@
   adding clean_removed
   adding clean_revert
   adding clean_untracked-clean
+  adding clean_untracked-revert
   adding clean_wc
   adding modified_clean
   adding modified_removed
   adding modified_revert
   adding modified_untracked-clean
+  adding modified_untracked-revert
   adding modified_wc
   adding removed_clean
   adding removed_removed
   adding removed_revert
   adding removed_untracked-clean
+  adding removed_untracked-revert
   adding removed_wc
   $ hg status
   A clean_clean
   A clean_removed
   A clean_revert
   A clean_untracked-clean
+  A clean_untracked-revert
   A clean_wc
   A modified_clean
   A modified_removed
   A modified_revert
   A modified_untracked-clean
+  A modified_untracked-revert
   A modified_wc
   A removed_clean
   A removed_removed
   A removed_revert
   A removed_untracked-clean
+  A removed_untracked-revert
   A removed_wc
   $ hg commit -m 'base'
 
@@ -595,16 +607,19 @@
   base   clean_removed
   base   clean_revert
   base   clean_untracked-clean
+  base   clean_untracked-revert
   base   clean_wc
   base   modified_clean
   base   modified_removed
   base   modified_revert
   base   modified_untracked-clean
+  base   modified_untracked-revert
   base   modified_wc
   base   removed_clean
   base   removed_removed
   base   removed_revert
   base   removed_untracked-clean
+  base   removed_untracked-revert
   base   removed_wc
 
 Create parent changeset
@@ -615,27 +630,32 @@
   adding added_removed
   adding added_revert
   adding added_untracked-clean
+  adding added_untracked-revert
   adding added_wc
   removing removed_clean
   removing removed_removed
   removing removed_revert
   removing removed_untracked-clean
+  removing removed_untracked-revert
   removing removed_wc
   $ hg status
   M modified_clean
   M modified_removed
   M modified_revert
   M modified_untracked-clean
+  M modified_untracked-revert
   M modified_wc
   A added_clean
   A added_removed
   A added_revert
   A added_untracked-clean
+  A added_untracked-revert
   A added_wc
   R removed_clean
   R removed_removed
   R removed_revert
   R removed_untracked-clean
+  R removed_untracked-revert
   R removed_wc
   $ hg commit -m 'parent'
 
@@ -647,16 +667,19 @@
   parent added_removed
   parent added_revert
   parent added_untracked-clean
+  parent added_untracked-revert
   parent added_wc
   base   clean_clean
   base   clean_removed
   base   clean_revert
   base   clean_untracked-clean
+  base   clean_untracked-revert
   base   clean_wc
   parent modified_clean
   parent modified_removed
   parent modified_revert
   parent modified_untracked-clean
+  parent modified_untracked-revert
   parent modified_wc
 
 Setup working directory
@@ -665,10 +688,12 @@
   $ hg addremove --similarity 0
   removing added_removed
   removing added_revert
+  removing added_untracked-revert
   removing clean_removed
   adding missing_wc
   removing modified_removed
   adding removed_revert
+  adding removed_untracked-revert
   adding removed_wc
   $ hg forget *untracked*
   $ hg status
@@ -682,10 +707,14 @@
   R added_removed
   R added_revert
   R added_untracked-clean
+  R added_untracked-revert
   R clean_removed
   R clean_untracked-clean
+  R clean_untracked-revert
   R modified_removed
   R modified_untracked-clean
+  R modified_untracked-revert
+  ? removed_untracked-revert
 
   $ hg status --rev 'desc("base")'
   M clean_wc
@@ -697,11 +726,14 @@
   A missing_wc
   R clean_removed
   R clean_untracked-clean
+  R clean_untracked-revert
   R modified_removed
   R modified_untracked-clean
+  R modified_untracked-revert
   R removed_clean
   R removed_removed
   R removed_untracked-clean
+  R removed_untracked-revert
 
 (create a simple text version of the content)
 
@@ -713,13 +745,16 @@
   base   clean_clean
   base   clean_revert
   base   clean_untracked-clean
+  base   clean_untracked-revert
   wc     clean_wc
   wc     missing_wc
   parent modified_clean
   base   modified_revert
   parent modified_untracked-clean
+  base   modified_untracked-revert
   wc     modified_wc
   base   removed_revert
+  base   removed_untracked-revert
   wc     removed_wc
 
   $ cd ..
@@ -738,14 +773,17 @@
   undeleting added_removed
   undeleting added_revert
   undeleting added_untracked-clean
+  undeleting added_untracked-revert
   reverting added_wc
   undeleting clean_removed
   undeleting clean_untracked-clean
+  undeleting clean_untracked-revert
   reverting clean_wc
   forgetting missing_wc
   undeleting modified_removed
   reverting modified_revert
   undeleting modified_untracked-clean
+  undeleting modified_untracked-revert
   reverting modified_wc
   forgetting removed_revert
   forgetting removed_wc
@@ -762,8 +800,10 @@
   +wc     clean_wc.orig
   +wc     missing_wc
   +base   modified_revert.orig
+  +base   modified_untracked-revert.orig
   +wc     modified_wc.orig
   +base   removed_revert
+  +base   removed_untracked-revert
   +wc     removed_wc
 
 Test revert --all to "base" content
@@ -788,17 +828,20 @@
   removing added_wc
   undeleting clean_removed
   undeleting clean_untracked-clean
+  undeleting clean_untracked-revert
   reverting clean_wc
   forgetting missing_wc
   reverting modified_clean
   undeleting modified_removed
   reverting modified_revert
   undeleting modified_untracked-clean
+  undeleting modified_untracked-revert
   reverting modified_wc
   adding removed_clean
   adding removed_removed
   reverting removed_revert
   adding removed_untracked-clean
+  adding removed_untracked-revert
   reverting removed_wc
 
 Compare resulting directory with revert target.
@@ -846,6 +889,8 @@
   
   ### revert for: added_untracked-clean
   
+  ### revert for: added_untracked-revert
+  
   ### revert for: added_wc
   
   ### revert for: clean_clean
@@ -858,6 +903,8 @@
   
   ### revert for: clean_untracked-clean
   
+  ### revert for: clean_untracked-revert
+  
   ### revert for: clean_wc
   
   ### revert for: missing_clean
@@ -872,6 +919,9 @@
   ### revert for: missing_untracked-clean
   missing_untracked-clean: no such file in rev * (glob)
   
+  ### revert for: missing_untracked-revert
+  missing_untracked-revert: no such file in rev * (glob)
+  
   ### revert for: missing_wc
   
   ### revert for: modified_clean
@@ -883,6 +933,8 @@
   
   ### revert for: modified_untracked-clean
   
+  ### revert for: modified_untracked-revert
+  
   ### revert for: modified_wc
   
   ### revert for: removed_clean
@@ -896,6 +948,9 @@
   ### revert for: removed_untracked-clean
   removed_untracked-clean: no such file in rev * (glob)
   
+  ### revert for: removed_untracked-revert
+  file not managed: removed_untracked-revert
+  
   ### revert for: removed_wc
   
 
@@ -929,6 +984,7 @@
 | - removed_revert
 | - added_removed
 | - added_untracked-clean
+| - added_untracked-revert
 
   $ for file in `python ../gen-revert-cases.py filelist`; do
   >   echo '### revert for:' $file;
@@ -943,6 +999,8 @@
   
   ### revert for: added_untracked-clean
   
+  ### revert for: added_untracked-revert
+  
   ### revert for: added_wc
   
   ### revert for: clean_clean
@@ -953,6 +1011,8 @@
   
   ### revert for: clean_untracked-clean
   
+  ### revert for: clean_untracked-revert
+  
   ### revert for: clean_wc
   
   ### revert for: missing_clean
@@ -967,6 +1027,9 @@
   ### revert for: missing_untracked-clean
   missing_untracked-clean: no such file in rev * (glob)
   
+  ### revert for: missing_untracked-revert
+  missing_untracked-revert: no such file in rev * (glob)
+  
   ### revert for: missing_wc
   
   ### revert for: modified_clean
@@ -977,6 +1040,8 @@
   
   ### revert for: modified_untracked-clean
   
+  ### revert for: modified_untracked-revert
+  
   ### revert for: modified_wc
   
   ### revert for: removed_clean
@@ -987,6 +1052,8 @@
   
   ### revert for: removed_untracked-clean
   
+  ### revert for: removed_untracked-revert
+  
   ### revert for: removed_wc