##// END OF EJS Templates
status: add a config knob for setting default of --terse...
Augie Fackler -
r38112:18424aee default
parent child Browse files
Show More
@@ -4809,6 +4809,8 b' def serve(ui, repo, **opts):'
4809 service = server.createservice(ui, repo, opts)
4809 service = server.createservice(ui, repo, opts)
4810 return server.runservice(opts, initfn=service.init, runfn=service.run)
4810 return server.runservice(opts, initfn=service.init, runfn=service.run)
4811
4811
4812 _NOTTERSE = 'nothing'
4813
4812 @command('^status|st',
4814 @command('^status|st',
4813 [('A', 'all', None, _('show status of all files')),
4815 [('A', 'all', None, _('show status of all files')),
4814 ('m', 'modified', None, _('show only modified files')),
4816 ('m', 'modified', None, _('show only modified files')),
@@ -4819,7 +4821,7 b' def serve(ui, repo, **opts):'
4819 ('u', 'unknown', None, _('show only unknown (not tracked) files')),
4821 ('u', 'unknown', None, _('show only unknown (not tracked) files')),
4820 ('i', 'ignored', None, _('show only ignored files')),
4822 ('i', 'ignored', None, _('show only ignored files')),
4821 ('n', 'no-status', None, _('hide status prefix')),
4823 ('n', 'no-status', None, _('hide status prefix')),
4822 ('t', 'terse', '', _('show the terse output (EXPERIMENTAL)')),
4824 ('t', 'terse', _NOTTERSE, _('show the terse output (EXPERIMENTAL)')),
4823 ('C', 'copies', None, _('show source of copied files')),
4825 ('C', 'copies', None, _('show source of copied files')),
4824 ('0', 'print0', None, _('end filenames with NUL, for use with xargs')),
4826 ('0', 'print0', None, _('end filenames with NUL, for use with xargs')),
4825 ('', 'rev', [], _('show difference from revision'), _('REV')),
4827 ('', 'rev', [], _('show difference from revision'), _('REV')),
@@ -4917,6 +4919,11 b' def status(ui, repo, *pats, **opts):'
4917 revs = opts.get('rev')
4919 revs = opts.get('rev')
4918 change = opts.get('change')
4920 change = opts.get('change')
4919 terse = opts.get('terse')
4921 terse = opts.get('terse')
4922 if terse is _NOTTERSE:
4923 if revs:
4924 terse = ''
4925 else:
4926 terse = ui.config('commands', 'status.terse')
4920
4927
4921 if revs and change:
4928 if revs and change:
4922 msg = _('cannot specify --rev and --change at the same time')
4929 msg = _('cannot specify --rev and --change at the same time')
@@ -193,6 +193,9 b" coreconfigitem('commands', 'status.relat"
193 coreconfigitem('commands', 'status.skipstates',
193 coreconfigitem('commands', 'status.skipstates',
194 default=[],
194 default=[],
195 )
195 )
196 coreconfigitem('commands', 'status.terse',
197 default='',
198 )
196 coreconfigitem('commands', 'status.verbose',
199 coreconfigitem('commands', 'status.verbose',
197 default=False,
200 default=False,
198 )
201 )
@@ -442,6 +442,10 b' effect and style see :hg:`help color`.'
442 Make paths in :hg:`status` output relative to the current directory.
442 Make paths in :hg:`status` output relative to the current directory.
443 (default: False)
443 (default: False)
444
444
445 ``status.terse``
446 Default value for the --terse flag, which condenes status output.
447 (default: empty)
448
445 ``update.check``
449 ``update.check``
446 Determines what level of checking :hg:`update` will perform before moving
450 Determines what level of checking :hg:`update` will perform before moving
447 to a destination revision. Valid values are ``abort``, ``none``,
451 to a destination revision. Valid values are ``abort``, ``none``,
@@ -183,3 +183,55 b' Trying with --rev'
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
General Comments 0
You need to be logged in to leave comments. Login now