Mercurial > public > mercurial-scm > hg
diff tests/test-revert-interactive.t @ 39405:cb70501d8b71
revert: fix the inconsistency of status msgs in --interactive mode
Before this patch we were priting every action msg before actually
performing that action and that was resulting in inconsistencies;
like in --interactive session if user decided to not revert any
changes in a file foo, still there will be a msg on console saying
"reverting foo".
To fix this, I have made some changes to print status msg just
before the action it is going to perform, no matter if --interactive
or not.
Changes made in test-revert-interactive.t reflect the changed behavior.
There are also some changes in test-revert.t because of change in the
order of messages.
Differential Revision: https://phab.mercurial-scm.org/D4380
author | Sushil khanchi <sushilkhanchi97@gmail.com> |
---|---|
date | Fri, 31 Aug 2018 23:28:09 +0530 |
parents | b95a6fb7ae66 |
children | 1cbe19eb496d |
line wrap: on
line diff
--- a/tests/test-revert-interactive.t Mon Sep 03 10:44:52 2018 +0530 +++ b/tests/test-revert-interactive.t Fri Aug 31 23:28:09 2018 +0530 @@ -51,11 +51,8 @@ > n > n > EOF - reverting f - reverting folder1/g + remove added file folder1/i (Yn)? y removing folder1/i - reverting folder2/h - remove added file folder1/i (Yn)? y diff --git a/f b/f 2 hunks, 2 lines changed examine changes to 'f'? [Ynesfdaq?] y @@ -115,6 +112,8 @@ 2 hunks, 2 lines changed examine changes to 'folder2/h'? [Ynesfdaq?] n + reverting folder1/g + reverting f $ cat f 1 2 @@ -140,8 +139,6 @@ Test that --interactive lift the need for --all $ echo q | hg revert -i -r 2 - reverting folder1/g - reverting folder2/h diff --git a/folder1/g b/folder1/g 1 hunks, 1 lines changed examine changes to 'folder1/g'? [Ynesfdaq?] q @@ -197,10 +194,6 @@ > n > n > EOF - reverting f - reverting folder1/g - removing folder1/i - reverting folder2/h remove added file folder1/i (Yn)? n diff --git a/f b/f 2 hunks, 2 lines changed @@ -250,6 +243,8 @@ 2 hunks, 2 lines changed examine changes to 'folder2/h'? [Ynesfdaq?] n + reverting folder1/g + reverting f $ cat f 1 2 @@ -354,7 +349,6 @@ > y > e > EOF - reverting k diff --git a/k b/k 1 hunks, 2 lines changed examine changes to 'k'? [Ynesfdaq?] y @@ -365,6 +359,7 @@ +2 discard this change to 'k'? [Ynesfdaq?] e + reverting k $ cat k 42 @@ -378,15 +373,14 @@ $ hg revert -i <<EOF > n > EOF - forgetting newfile forget added file newfile (Yn)? n $ hg status A newfile $ hg revert -i <<EOF > y > EOF + forget added file newfile (Yn)? y forgetting newfile - forget added file newfile (Yn)? y $ hg status ? newfile @@ -406,7 +400,6 @@ > y > y > EOF - reverting a diff --git a/a b/a 1 hunks, 1 lines changed examine changes to 'a'? [Ynesfdaq?] y @@ -417,6 +410,7 @@ \ No newline at end of file apply this change to 'a'? [Ynesfdaq?] y + reverting a $ cat a 0