diff mercurial/ui.py @ 37137:6890b7e991a4

help: supporting both help and doc for aliases This allows an alias to be definted like: [alias] lj = log -Tjson lj:help = [-r REV] lj:doc = Shows the revision log in JSON format. Differential Revision: https://phab.mercurial-scm.org/D2678
author Rodrigo Damazio <rdamazio@google.com>
date Sun, 04 Mar 2018 17:11:33 -0500
parents a8a902d7176e
children bbd240f81ac5
line wrap: on
line diff
--- a/mercurial/ui.py	Tue Mar 27 20:21:30 2018 +0530
+++ b/mercurial/ui.py	Sun Mar 04 17:11:33 2018 -0500
@@ -739,11 +739,7 @@
     def configitems(self, section, untrusted=False, ignoresub=False):
         items = self._data(untrusted).items(section)
         if ignoresub:
-            newitems = {}
-            for k, v in items:
-                if ':' not in k:
-                    newitems[k] = v
-            items = list(newitems.iteritems())
+            items = [i for i in items if ':' not in i[0]]
         if self.debugflag and not untrusted and self._reportuntrusted:
             for k, v in self._ucfg.items(section):
                 if self._tcfg.get(section, k) != v: