Mercurial > hg-stable
changeset 22144:b7c9f07b76c1
test-revert: add case where file is tracked but deleted in working directory
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Wed, 25 Jun 2014 17:40:41 +0100 |
parents | ca278b893940 |
children | 44d6818b9cd9 |
files | tests/test-revert.t |
diffstat | 1 files changed, 69 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-revert.t Fri Jun 27 18:25:19 2014 +0200 +++ b/tests/test-revert.t Wed Jun 25 17:40:41 2014 +0100 @@ -457,6 +457,9 @@ > 'wc': lambda cc: 'wc', > # removed: file is missing and marked as untracked > 'removed': lambda cc: None, + > # deleted: file is recorded as tracked but missing + > # rely on file deletion outside of this script + > 'deleted': lambda cc:'TOBEDELETED', > } > # untracked-X is a version of X where the file is not tracked (? unknown) > wccontent['untracked-clean'] = wccontent['clean'] @@ -506,6 +509,7 @@ $ python gen-revert-cases.py filelist added_clean + added_deleted added_removed added_revert added_untracked-clean @@ -513,6 +517,7 @@ added_untracked-wc added_wc clean_clean + clean_deleted clean_removed clean_revert clean_untracked-clean @@ -520,6 +525,7 @@ clean_untracked-wc clean_wc missing_clean + missing_deleted missing_removed missing_revert missing_untracked-clean @@ -527,6 +533,7 @@ missing_untracked-wc missing_wc modified_clean + modified_deleted modified_removed modified_revert modified_untracked-clean @@ -534,6 +541,7 @@ modified_untracked-wc modified_wc removed_clean + removed_deleted removed_removed removed_revert removed_untracked-clean @@ -567,6 +575,7 @@ $ python ../gen-revert-cases.py base $ hg addremove --similarity 0 adding clean_clean + adding clean_deleted adding clean_removed adding clean_revert adding clean_untracked-clean @@ -574,6 +583,7 @@ adding clean_untracked-wc adding clean_wc adding modified_clean + adding modified_deleted adding modified_removed adding modified_revert adding modified_untracked-clean @@ -581,6 +591,7 @@ adding modified_untracked-wc adding modified_wc adding removed_clean + adding removed_deleted adding removed_removed adding removed_revert adding removed_untracked-clean @@ -589,6 +600,7 @@ adding removed_wc $ hg status A clean_clean + A clean_deleted A clean_removed A clean_revert A clean_untracked-clean @@ -596,6 +608,7 @@ A clean_untracked-wc A clean_wc A modified_clean + A modified_deleted A modified_removed A modified_revert A modified_untracked-clean @@ -603,6 +616,7 @@ A modified_untracked-wc A modified_wc A removed_clean + A removed_deleted A removed_removed A removed_revert A removed_untracked-clean @@ -616,6 +630,7 @@ $ python ../dircontent.py > ../content-base.txt $ cat ../content-base.txt base clean_clean + base clean_deleted base clean_removed base clean_revert base clean_untracked-clean @@ -623,6 +638,7 @@ base clean_untracked-wc base clean_wc base modified_clean + base modified_deleted base modified_removed base modified_revert base modified_untracked-clean @@ -630,6 +646,7 @@ base modified_untracked-wc base modified_wc base removed_clean + base removed_deleted base removed_removed base removed_revert base removed_untracked-clean @@ -642,6 +659,7 @@ $ python ../gen-revert-cases.py parent $ hg addremove --similarity 0 adding added_clean + adding added_deleted adding added_removed adding added_revert adding added_untracked-clean @@ -649,6 +667,7 @@ adding added_untracked-wc adding added_wc removing removed_clean + removing removed_deleted removing removed_removed removing removed_revert removing removed_untracked-clean @@ -657,6 +676,7 @@ removing removed_wc $ hg status M modified_clean + M modified_deleted M modified_removed M modified_revert M modified_untracked-clean @@ -664,6 +684,7 @@ M modified_untracked-wc M modified_wc A added_clean + A added_deleted A added_removed A added_revert A added_untracked-clean @@ -671,6 +692,7 @@ A added_untracked-wc A added_wc R removed_clean + R removed_deleted R removed_removed R removed_revert R removed_untracked-clean @@ -684,6 +706,7 @@ $ python ../dircontent.py > ../content-parent.txt $ cat ../content-parent.txt parent added_clean + parent added_deleted parent added_removed parent added_revert parent added_untracked-clean @@ -691,6 +714,7 @@ parent added_untracked-wc parent added_wc base clean_clean + base clean_deleted base clean_removed base clean_revert base clean_untracked-clean @@ -698,6 +722,7 @@ base clean_untracked-wc base clean_wc parent modified_clean + parent modified_deleted parent modified_removed parent modified_revert parent modified_untracked-clean @@ -713,14 +738,17 @@ removing added_revert removing added_untracked-revert 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 adding removed_wc $ hg forget *untracked* + $ rm *deleted* $ hg status M added_wc M clean_wc @@ -742,6 +770,11 @@ R modified_untracked-clean R modified_untracked-revert R modified_untracked-wc + ! added_deleted + ! clean_deleted + ! missing_deleted + ! modified_deleted + ! removed_deleted ? missing_untracked-wc ? removed_untracked-revert ? removed_untracked-wc @@ -763,10 +796,16 @@ 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) @@ -809,24 +848,29 @@ check revert output $ 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 undeleting clean_removed undeleting clean_untracked-clean undeleting clean_untracked-revert undeleting clean_untracked-wc reverting clean_wc + forgetting missing_deleted forgetting missing_wc + reverting modified_deleted undeleting modified_removed reverting modified_revert undeleting modified_untracked-clean undeleting modified_untracked-revert undeleting modified_untracked-wc reverting modified_wc + forgetting removed_deleted forgetting removed_revert forgetting removed_wc @@ -872,14 +916,18 @@ $ hg revert --all --rev 'desc(base)' removing added_clean + removing added_deleted removing added_wc + reverting clean_deleted undeleting clean_removed undeleting clean_untracked-clean undeleting clean_untracked-revert undeleting clean_untracked-wc reverting clean_wc + forgetting missing_deleted forgetting missing_wc reverting modified_clean + reverting modified_deleted undeleting modified_removed reverting modified_revert undeleting modified_untracked-clean @@ -887,6 +935,7 @@ undeleting modified_untracked-wc reverting modified_wc adding removed_clean + reverting removed_deleted adding removed_removed reverting removed_revert adding removed_untracked-clean @@ -938,6 +987,8 @@ ### revert for: added_clean no changes needed to added_clean + ### revert for: added_deleted + ### revert for: added_removed ### revert for: added_revert @@ -953,6 +1004,8 @@ ### revert for: clean_clean no changes needed to clean_clean + ### revert for: clean_deleted + ### revert for: clean_removed ### revert for: clean_revert @@ -969,6 +1022,8 @@ ### 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) @@ -989,6 +1044,8 @@ ### revert for: modified_clean no changes needed to modified_clean + ### revert for: modified_deleted + ### revert for: modified_removed ### revert for: modified_revert @@ -1004,6 +1061,8 @@ ### 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) @@ -1061,6 +1120,8 @@ > done ### revert for: added_clean + ### revert for: added_deleted + ### revert for: added_removed ### revert for: added_revert @@ -1075,6 +1136,8 @@ ### revert for: clean_clean + ### revert for: clean_deleted + ### revert for: clean_removed ### revert for: clean_revert @@ -1090,6 +1153,8 @@ ### 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) @@ -1109,6 +1174,8 @@ ### revert for: modified_clean + ### revert for: modified_deleted + ### revert for: modified_removed ### revert for: modified_revert @@ -1123,6 +1190,8 @@ ### revert for: removed_clean + ### revert for: removed_deleted + ### revert for: removed_removed ### revert for: removed_revert