Mercurial > hg
comparison tests/test-revert.t @ 22190:55308ab8117c
revert: use modified information from both statuses
Using status information against the target ensures we are catching all
files with modifications that need reverting.
We still need to distinguish fresh modifications for backup purpose.
test-largefile is affected because it reverted a file that needs no content
change.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Tue, 24 Jun 2014 17:27:18 +0100 |
parents | a89bc7833e0d |
children | d3659b3795e9 |
comparison
equal
deleted
inserted
replaced
22189:cde6b489365c | 22190:55308ab8117c |
---|---|
910 | 910 |
911 Misbehavior: | 911 Misbehavior: |
912 | 912 |
913 - report "reverting" when file needs no changes | 913 - report "reverting" when file needs no changes |
914 | | 914 | |
915 | - reverting modified_revert | |
916 | - reverting removed_revert | 915 | - reverting removed_revert |
917 | 916 |
918 $ hg revert --all --rev 'desc(base)' | 917 $ hg revert --all --rev 'desc(base)' |
919 removing added_clean | 918 removing added_clean |
920 removing added_deleted | 919 removing added_deleted |
928 forgetting missing_deleted | 927 forgetting missing_deleted |
929 forgetting missing_wc | 928 forgetting missing_wc |
930 reverting modified_clean | 929 reverting modified_clean |
931 reverting modified_deleted | 930 reverting modified_deleted |
932 undeleting modified_removed | 931 undeleting modified_removed |
933 reverting modified_revert | |
934 undeleting modified_untracked-clean | 932 undeleting modified_untracked-clean |
935 undeleting modified_untracked-revert | 933 undeleting modified_untracked-revert |
936 undeleting modified_untracked-wc | 934 undeleting modified_untracked-wc |
937 reverting modified_wc | 935 reverting modified_wc |
938 adding removed_clean | 936 adding removed_clean |
1102 | 1100 |
1103 Misbehavior: | 1101 Misbehavior: |
1104 | 1102 |
1105 - fails to report no change to revert for | 1103 - fails to report no change to revert for |
1106 | | 1104 | |
1107 | - modified_revert | |
1108 | - removed_revert | 1105 | - removed_revert |
1109 | 1106 |
1110 $ for file in `python ../gen-revert-cases.py filelist`; do | 1107 $ for file in `python ../gen-revert-cases.py filelist`; do |
1111 > echo '### revert for:' $file; | 1108 > echo '### revert for:' $file; |
1112 > hg revert $file --rev 'desc(base)'; | 1109 > hg revert $file --rev 'desc(base)'; |
1178 ### revert for: modified_deleted | 1175 ### revert for: modified_deleted |
1179 | 1176 |
1180 ### revert for: modified_removed | 1177 ### revert for: modified_removed |
1181 | 1178 |
1182 ### revert for: modified_revert | 1179 ### revert for: modified_revert |
1180 no changes needed to modified_revert | |
1183 | 1181 |
1184 ### revert for: modified_untracked-clean | 1182 ### revert for: modified_untracked-clean |
1185 | 1183 |
1186 ### revert for: modified_untracked-revert | 1184 ### revert for: modified_untracked-revert |
1187 | 1185 |