[PATCH] status: make options optional (issue1481)
Christian Ebert
blacktrash at gmx.net
Sun Jan 25 09:52:11 UTC 2009
* Alexander Solovyov on Sunday, January 25, 2009 at 11:28:41 +0200
> # HG changeset patch
> # User Alexander Solovyov <piranha at piranha.org.ua>
> # Date 1232875673 -7200
> # Node ID ee3364d3d85960a10b060ec55ae613a08b00243d
> # Parent 39ae4fb8cf17a0a12ac862d36471afd0fa453d85
> status: make options optional (issue1481)
>
> diff -r 39ae4fb8cf17 -r ee3364d3d859 mercurial/commands.py
> --- a/mercurial/commands.py Fri Jan 23 23:39:28 2009 +0100
> +++ b/mercurial/commands.py Sun Jan 25 11:27:53 2009 +0200
> @@ -2748,7 +2748,7 @@
> end = opts.get('print0') and '\0' or '\n'
> copy = {}
> states = 'modified added removed deleted unknown ignored clean'.split()
> - show = [k for k in states if opts[k]]
> + show = [k for k in states if opts.get(k)]
> if opts.get('all'):
> show += ui.quiet and (states[:4] + ['clean']) or states
> if not show:
Should this be changed in a more general manner?
$ fgrep opts[ mercurial/*.py
still shows quite some matches in cmdutil and commands. Or
should the cost of opts.get avoided in the kernel?
c
--
\black\trash movie _C O W B O Y_ _C A N O E_ _C O M A_
Ein deutscher Western/A German Western
-->> http://www.blacktrash.org/underdogma/ccc.html
-->> http://www.blacktrash.org/underdogma/ccc-en.html
More information about the Mercurial-devel
mailing list