comparison tests/test-status-terse.t @ 38100:18424aeece7f

status: add a config knob for setting default of --terse I want --terse=u basically 100% of the time, but there's not a good way to do that before this patch. I'm very unhappy with how the default value for --terse looks rigt now, but it does *work*. The alternative would be to define an "optional string" flag type using fancyopts.customopt and then use that, leaving the default as None. Does anyone have a strong preference for that, or a better idea? Differential Revision: https://phab.mercurial-scm.org/D3627
author Augie Fackler <augie@google.com>
date Mon, 14 May 2018 22:01:27 -0400
parents 5cef00cdba7f
children 09b09fe7ee90
comparison
equal deleted inserted replaced
38099:5a87bf0bd343 38100:18424aeece7f
181 Trying with --rev 181 Trying with --rev
182 182
183 $ hg status --terse marduic --rev 0 --rev 1 183 $ hg status --terse marduic --rev 0 --rev 1
184 abort: cannot use --terse with --rev 184 abort: cannot use --terse with --rev
185 [255] 185 [255]
186
187 Config item to set the default terseness
188 $ cat <<EOF >> $HGRCPATH
189 > [commands]
190 > status.terse = u
191 > EOF
192 $ hg status -mu
193 M x/aa
194 M x/bb
195 ? a
196 ? b
197 ? x/l/
198 ? x/m/
199 ? x/n/
200 ? y/
201
202 Command line flag overrides the default
203 $ hg status --terse=
204 M x/aa
205 M x/bb
206 ? a
207 ? b
208 ? x/l/aa
209 ? x/l/u/a/bb
210 ? x/l/u/bb
211 ? x/m/aa
212 ? x/n/aa
213 ? y/l
214 ? y/m
215 $ hg status --terse=mardu
216 M x/aa
217 M x/bb
218 ? a
219 ? b
220 ? x/l/
221 ? x/m/
222 ? x/n/
223 ? y/
224
225 Specifying --rev should still work, with the terseness disabled.
226 $ hg status --rev 0
227 M x/aa
228 M x/bb
229 ? a
230 ? b
231 ? x/l/aa
232 ? x/l/u/a/bb
233 ? x/l/u/bb
234 ? x/m/aa
235 ? x/n/aa
236 ? y/l
237 ? y/m