diff -r 7a8ea1397816 -r d718eddf01d9 mercurial/help.py --- a/mercurial/help.py Thu Dec 08 15:33:19 2022 +0100 +++ b/mercurial/help.py Thu Aug 31 23:56:15 2023 +0200 @@ -43,7 +43,6 @@ templatefuncs, templatekw, ui as uimod, - util, ) from .hgweb import webcommands from .utils import ( @@ -810,7 +809,7 @@ doc = gettext(pycompat.getdoc(entry[0])) if not doc: doc = _(b"(no help text available)") - if util.safehasattr(entry[0], 'definition'): # aliased command + if hasattr(entry[0], 'definition'): # aliased command source = entry[0].source if entry[0].definition.startswith(b'!'): # shell alias doc = _(b'shell alias for: %s\n\n%s\n\ndefined by: %s\n') % (