##// END OF EJS Templates
extensions: refactor function for obtaining disabled extension help...
Gregory Szorc -
r45145:843418dc default
parent child Browse files
Show More
@@ -808,18 +808,8 b' def disabled():'
808 808 return exts
809 809
810 810
811 def disabledext(name):
812 '''find a specific disabled extension from hgext. returns desc'''
813 try:
814 from hgext import __index__ # pytype: disable=import-error
815
816 if name in _order: # enabled
817 return
818 else:
819 return gettext(__index__.docs.get(name))
820 except (ImportError, AttributeError):
821 pass
822
811 def disabled_help(name):
812 """Obtain the full help text for a disabled extension, or None."""
823 813 paths = _disabledpaths()
824 814 if name in paths:
825 815 return _disabledhelp(paths[name])
@@ -966,7 +966,7 b' def help_('
966 966 doc = gettext(pycompat.getdoc(mod)) or _(b'no help text available')
967 967 except KeyError:
968 968 mod = None
969 doc = extensions.disabledext(name)
969 doc = extensions.disabled_help(name)
970 970 if not doc:
971 971 raise error.UnknownCommand(name)
972 972
@@ -695,7 +695,7 b' def clone('
695 695 # data.
696 696 createopts[b'lfs'] = True
697 697
698 if extensions.disabledext(b'lfs'):
698 if extensions.disabled_help(b'lfs'):
699 699 ui.status(
700 700 _(
701 701 b'(remote is using large file support (lfs), but it is '
General Comments 0
You need to be logged in to leave comments. Login now