Mercurial > hg > mercurial-source
diff mercurial/help.py @ 29578:3640c1702c43
help: report source of aliases
author | timeless <timeless@mozdev.org> |
---|---|
date | Fri, 08 Apr 2016 18:35:49 +0000 (2016-04-08) |
parents | 045fe7042510 |
children | aba2bb2a6d0f |
line wrap: on
line diff
--- a/mercurial/help.py +++ b/mercurial/help.py @@ -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])