Mercurial > public > mercurial-scm > hg-stable
diff mercurial/help.py @ 28828:3640c1702c43
help: report source of aliases
author | timeless <timeless@mozdev.org> |
---|---|
date | Fri, 08 Apr 2016 18:35:49 +0000 |
parents | 045fe7042510 |
children | aba2bb2a6d0f |
line wrap: on
line diff
--- a/mercurial/help.py Fri Apr 08 16:05:52 2016 +0000 +++ b/mercurial/help.py Fri Apr 08 18:35:49 2016 +0000 @@ -336,10 +336,13 @@ if not doc: doc = _("(no help text available)") if util.safehasattr(entry[0], 'definition'): # aliased command + source = entry[0].source if entry[0].definition.startswith('!'): # shell alias - doc = _('shell alias for::\n\n %s') % entry[0].definition[1:] + doc = (_('shell alias for::\n\n %s\n\ndefined by: %s\n') % + (entry[0].definition[1:], source)) else: - doc = _('alias for: hg %s\n\n%s') % (entry[0].definition, doc) + doc = (_('alias for: hg %s\n\n%s\n\ndefined by: %s\n') % + (entry[0].definition, doc, source)) doc = doc.splitlines(True) if ui.quiet or not full: rst.append(doc[0])