Patchwork [5,of,5] test-revert: removing a missing file has no effect

login
register
mail settings
Submitter Martin von Zweigbergk
Date Nov. 2, 2014, 10:19 p.m.
Message ID <a315522f4696b11b09e2.1414966773@handduk2.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/6551/
State Accepted
Headers show

Comments

Martin von Zweigbergk - Nov. 2, 2014, 10:19 p.m.
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@gmail.com>
# Date 1413529148 25200
#      Thu Oct 16 23:59:08 2014 -0700
# Branch stable
# Node ID a315522f4696b11b09e21c61500b8e0e4aa42dc3
# Parent  30e5bc8a6c066e65fca7f9384ab9d8669109969b
test-revert: removing a missing file has no effect

The tests for removed_deleted and removed_removed test the same state
as removed_clean and removed_untracked-clean, respectively. Drop the
duplicate tests.
Pierre-Yves David - Nov. 3, 2014, 10:35 p.m.
On 11/02/2014 10:19 PM, Martin von Zweigbergk wrote:
> # HG changeset patch
> # User Martin von Zweigbergk <martinvonz@gmail.com>
> # Date 1413529148 25200
> #      Thu Oct 16 23:59:08 2014 -0700
> # Branch stable
> # Node ID a315522f4696b11b09e21c61500b8e0e4aa42dc3
> # Parent  30e5bc8a6c066e65fca7f9384ab9d8669109969b
> test-revert: removing a missing file has no effect
>
> The tests for removed_deleted and removed_removed test the same state
> as removed_clean and removed_untracked-clean, respectively. Drop the
> duplicate tests.

I've queued those one, and all the rest of the series (who never reached 
the list)

Thanks.

Patch

diff --git a/tests/test-revert.t b/tests/test-revert.t
--- a/tests/test-revert.t
+++ b/tests/test-revert.t
@@ -472,6 +472,8 @@ 
   >             continue
   >         if not ctxvalue[0] and 'revert' in wckey:
   >             continue
+  >         if not ctxvalue[1] and ('removed' in wckey or 'deleted' in wckey):
+  >             continue
   >         filename = "%s_%s" % (ctxkey, wckey)
   >         combination.append((filename, ctxkey, wckey))
   > 
@@ -523,8 +525,6 @@ 
   clean_untracked-wc
   clean_wc
   missing_clean
-  missing_deleted
-  missing_removed
   missing_untracked-clean
   missing_untracked-wc
   missing_wc
@@ -537,8 +537,6 @@ 
   modified_untracked-wc
   modified_wc
   removed_clean
-  removed_deleted
-  removed_removed
   removed_revert
   removed_untracked-clean
   removed_untracked-revert
@@ -585,8 +583,6 @@ 
   adding modified_untracked-wc
   adding modified_wc
   adding removed_clean
-  adding removed_deleted
-  adding removed_removed
   adding removed_revert
   adding removed_untracked-clean
   adding removed_untracked-revert
@@ -608,8 +604,6 @@ 
   A modified_untracked-wc
   A modified_wc
   A removed_clean
-  A removed_deleted
-  A removed_removed
   A removed_revert
   A removed_untracked-clean
   A removed_untracked-revert
@@ -636,8 +630,6 @@ 
   base   modified_untracked-wc
   base   modified_wc
   base   removed_clean
-  base   removed_deleted
-  base   removed_removed
   base   removed_revert
   base   removed_untracked-clean
   base   removed_untracked-revert
@@ -655,8 +647,6 @@ 
   adding added_untracked-wc
   adding added_wc
   removing removed_clean
-  removing removed_deleted
-  removing removed_removed
   removing removed_revert
   removing removed_untracked-clean
   removing removed_untracked-revert
@@ -678,8 +668,6 @@ 
   A added_untracked-wc
   A added_wc
   R removed_clean
-  R removed_deleted
-  R removed_removed
   R removed_revert
   R removed_untracked-clean
   R removed_untracked-revert
@@ -718,11 +706,9 @@ 
   $ hg addremove --similarity 0
   removing added_removed
   removing clean_removed
-  adding missing_deleted
   adding missing_untracked-wc
   adding missing_wc
   removing modified_removed
-  adding removed_deleted
   adding removed_revert
   adding removed_untracked-revert
   adding removed_untracked-wc
@@ -749,9 +735,7 @@ 
   R modified_untracked-wc
   ! added_deleted
   ! clean_deleted
-  ! missing_deleted
   ! modified_deleted
-  ! removed_deleted
   ? missing_untracked-wc
   ? removed_untracked-revert
   ? removed_untracked-wc
@@ -772,16 +756,12 @@ 
   R modified_untracked-revert
   R modified_untracked-wc
   R removed_clean
-  R removed_deleted
-  R removed_removed
   R removed_untracked-clean
   R removed_untracked-revert
   R removed_untracked-wc
   ! added_deleted
   ! clean_deleted
-  ! missing_deleted
   ! modified_deleted
-  ! removed_deleted
   ? missing_untracked-wc
 
 (create a simple text version of the content)
@@ -832,7 +812,6 @@ 
   undeleting clean_untracked-clean
   undeleting clean_untracked-wc
   reverting clean_wc
-  forgetting missing_deleted
   forgetting missing_wc
   reverting modified_deleted
   undeleting modified_removed
@@ -841,7 +820,6 @@ 
   undeleting modified_untracked-revert
   undeleting modified_untracked-wc
   reverting modified_wc
-  forgetting removed_deleted
   forgetting removed_revert
   forgetting removed_wc
 
@@ -887,7 +865,6 @@ 
   undeleting clean_untracked-clean
   undeleting clean_untracked-wc
   reverting clean_wc
-  forgetting missing_deleted
   forgetting missing_wc
   reverting modified_clean
   reverting modified_deleted
@@ -897,8 +874,6 @@ 
   undeleting modified_untracked-wc
   reverting modified_wc
   adding removed_clean
-  reverting removed_deleted
-  adding removed_removed
   adding removed_untracked-clean
   adding removed_untracked-revert
   adding removed_untracked-wc
@@ -970,11 +945,6 @@ 
   ### revert for: missing_clean
   missing_clean: no such file in rev * (glob)
   
-  ### revert for: missing_deleted
-  
-  ### revert for: missing_removed
-  missing_removed: no such file in rev * (glob)
-  
   ### revert for: missing_untracked-clean
   missing_untracked-clean: no such file in rev * (glob)
   
@@ -1003,11 +973,6 @@ 
   ### revert for: removed_clean
   removed_clean: no such file in rev * (glob)
   
-  ### revert for: removed_deleted
-  
-  ### revert for: removed_removed
-  removed_removed: no such file in rev * (glob)
-  
   ### revert for: removed_revert
   
   ### revert for: removed_untracked-clean
@@ -1077,11 +1042,6 @@ 
   ### revert for: missing_clean
   missing_clean: no such file in rev * (glob)
   
-  ### revert for: missing_deleted
-  
-  ### revert for: missing_removed
-  missing_removed: no such file in rev * (glob)
-  
   ### revert for: missing_untracked-clean
   missing_untracked-clean: no such file in rev * (glob)
   
@@ -1109,10 +1069,6 @@ 
   
   ### revert for: removed_clean
   
-  ### revert for: removed_deleted
-  
-  ### revert for: removed_removed
-  
   ### revert for: removed_revert
   no changes needed to removed_revert