comparison tests/test-diff-color.t @ 42071:db72f9f6580e

interactive: do not prompt about files given in command line For commit and revert commands with --interactive and explicit files given in the command line, we now skip the invite to "examine changes to <file> ? [Ynesfdaq?]". The reason for this is that, if <file> is specified by the user, asking for confirmation is redundant. In patch.filterpatch(), we now use an optional "match" argument to conditionally call the prompt() function when entering a new "header" item. We use .exact() method to compare with files from the "header" in order to only consider (rel)path patterns. Add tests with glob patterns for commit and revert, to make sure we still ask to examine files in these cases.
author Denis Laxalde <denis.laxalde@logilab.fr>
date Thu, 04 Apr 2019 11:35:18 +0200
parents 5abc47d4ca6b
children f802a75da585
comparison
equal deleted inserted replaced
42070:675775c33ab6 42071:db72f9f6580e
155 record 155 record
156 156
157 $ chmod +x a 157 $ chmod +x a
158 $ hg record -m moda a <<EOF 158 $ hg record -m moda a <<EOF
159 > y 159 > y
160 > y
161 > EOF 160 > EOF
162 \x1b[0;1mdiff --git a/a b/a\x1b[0m (esc) 161 \x1b[0;1mdiff --git a/a b/a\x1b[0m (esc)
163 \x1b[0;36;1mold mode 100644\x1b[0m (esc) 162 \x1b[0;36;1mold mode 100644\x1b[0m (esc)
164 \x1b[0;36;1mnew mode 100755\x1b[0m (esc) 163 \x1b[0;36;1mnew mode 100755\x1b[0m (esc)
165 1 hunks, 1 lines changed 164 1 hunks, 1 lines changed
166 \x1b[0;33mexamine changes to 'a'? [Ynesfdaq?]\x1b[0m y (esc)
167
168 \x1b[0;35m@@ -2,7 +2,7 @@ c\x1b[0m (esc) 165 \x1b[0;35m@@ -2,7 +2,7 @@ c\x1b[0m (esc)
169 c 166 c
170 a 167 a
171 a 168 a
172 \x1b[0;31m-b\x1b[0m (esc) 169 \x1b[0;31m-b\x1b[0m (esc)