Mercurial > public > mercurial-scm > hg
comparison mercurial/ui.py @ 37134: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 |
comparison
equal
deleted
inserted
replaced
37133:a2a6755a3def | 37134:6890b7e991a4 |
---|---|
737 return section in self._data(untrusted) | 737 return section in self._data(untrusted) |
738 | 738 |
739 def configitems(self, section, untrusted=False, ignoresub=False): | 739 def configitems(self, section, untrusted=False, ignoresub=False): |
740 items = self._data(untrusted).items(section) | 740 items = self._data(untrusted).items(section) |
741 if ignoresub: | 741 if ignoresub: |
742 newitems = {} | 742 items = [i for i in items if ':' not in i[0]] |
743 for k, v in items: | |
744 if ':' not in k: | |
745 newitems[k] = v | |
746 items = list(newitems.iteritems()) | |
747 if self.debugflag and not untrusted and self._reportuntrusted: | 743 if self.debugflag and not untrusted and self._reportuntrusted: |
748 for k, v in self._ucfg.items(section): | 744 for k, v in self._ucfg.items(section): |
749 if self._tcfg.get(section, k) != v: | 745 if self._tcfg.get(section, k) != v: |
750 self.debug("ignoring untrusted configuration option " | 746 self.debug("ignoring untrusted configuration option " |
751 "%s.%s = %s\n" % (section, k, v)) | 747 "%s.%s = %s\n" % (section, k, v)) |