[RFC] [PATCH] ui: differentiate empty configlist from None
Martin Geisler
mg at lazybytes.net
Sun Aug 15 10:39:34 CDT 2010
Alecs King <alecsk at gmail.com> writes:
> # HG changeset patch
> # User Alecs King <alecsk at gmail.com>
> # Date 1281529719 -28800
> # Branch my
> # Node ID b815f1650d03a054a1e9b40761880b97afaad9ed
> # Parent 3d4a8bf13a65ac1878774eaaa07a4ae1f944455d
> ui: differentiate empty configlist from None
>
> diff --git a/mercurial/ui.py b/mercurial/ui.py
> --- a/mercurial/ui.py
> +++ b/mercurial/ui.py
> @@ -218,7 +218,7 @@ class ui(object):
> def _configlist(s):
> s = s.rstrip(' ,')
> if not s:
> - return None
> + return []
> parser, parts, offset = _parse_plain, [''], 0
> while parser:
> parser, parts, offset = parser(parts, s, offset)
Henrik, could you please push this patch if it is okay?
I'm unsure exactly when _configlist should return None since I can see
it does it at least twice and that configlist checks for None to decide
if the default value should be used.
--
Martin Geisler
Mercurial links: http://mercurial.ch/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20100815/db7c33cb/attachment.pgp>
More information about the Mercurial-devel
mailing list