test-revert: reverting an addition is the same as removing
The tests for added_revert and added_untracked-revert test the same
state as added_deleted and added_removed, respectively. Drop the
duplicate tests.
See additional motivation in earlier patch.
--- a/tests/test-revert.t Thu Oct 16 23:36:40 2014 -0700
+++ b/tests/test-revert.t Fri Oct 17 00:39:26 2014 -0700
@@ -470,6 +470,8 @@
> for wckey in wccontent:
> if (ctxvalue[0] == ctxvalue[1] and 'revert' in wckey):
> continue
+ > if not ctxvalue[0] and 'revert' in wckey:
+ > continue
> filename = "%s_%s" % (ctxkey, wckey)
> combination.append((filename, ctxkey, wckey))
>
@@ -511,9 +513,7 @@
added_clean
added_deleted
added_removed
- added_revert
added_untracked-clean
- added_untracked-revert
added_untracked-wc
added_wc
clean_clean
@@ -651,9 +651,7 @@
adding added_clean
adding added_deleted
adding added_removed
- adding added_revert
adding added_untracked-clean
- adding added_untracked-revert
adding added_untracked-wc
adding added_wc
removing removed_clean
@@ -676,9 +674,7 @@
A added_clean
A added_deleted
A added_removed
- A added_revert
A added_untracked-clean
- A added_untracked-revert
A added_untracked-wc
A added_wc
R removed_clean
@@ -698,9 +694,7 @@
parent added_clean
parent added_deleted
parent added_removed
- parent added_revert
parent added_untracked-clean
- parent added_untracked-revert
parent added_untracked-wc
parent added_wc
base clean_clean
@@ -723,8 +717,6 @@
$ python ../gen-revert-cases.py wc
$ hg addremove --similarity 0
removing added_removed
- removing added_revert
- removing added_untracked-revert
removing clean_removed
adding missing_deleted
adding missing_untracked-wc
@@ -746,9 +738,7 @@
A removed_revert
A removed_wc
R added_removed
- R added_revert
R added_untracked-clean
- R added_untracked-revert
R added_untracked-wc
R clean_removed
R clean_untracked-clean
@@ -834,9 +824,7 @@
$ hg revert --all
reverting added_deleted
undeleting added_removed
- undeleting added_revert
undeleting added_untracked-clean
- undeleting added_untracked-revert
undeleting added_untracked-wc
reverting added_wc
reverting clean_deleted
@@ -960,12 +948,8 @@
### revert for: added_removed
- ### revert for: added_revert
-
### revert for: added_untracked-clean
- ### revert for: added_untracked-revert
-
### revert for: added_untracked-wc
### revert for: added_wc
@@ -1069,15 +1053,9 @@
### revert for: added_removed
no changes needed to added_removed
- ### revert for: added_revert
- no changes needed to added_revert
-
### revert for: added_untracked-clean
no changes needed to added_untracked-clean
- ### revert for: added_untracked-revert
- no changes needed to added_untracked-revert
-
### revert for: added_untracked-wc
no changes needed to added_untracked-wc