mercurial/commands.py
changeset 12697 14853ca7e11b
parent 12689 c52c629ce19e
child 12698 7aef77e74cf3
child 12699 0159a674a7bc
--- a/mercurial/commands.py	Sun Oct 10 17:35:28 2010 -0500
+++ b/mercurial/commands.py	Sat Oct 09 16:55:33 2010 -0500
@@ -1066,7 +1066,9 @@
         ui.debug(_('read config from: %s\n') % f)
     untrusted = bool(opts.get('untrusted'))
     if values:
-        if len([v for v in values if '.' in v]) > 1:
+        sections = [v for v in values if '.' not in v]
+        items = [v for v in values if '.' in v]
+        if len(items) > 1 or items and sections:
             raise util.Abort(_('only one config item permitted'))
     for section, name, value in ui.walkconfig(untrusted=untrusted):
         sectname = section + '.' + name