Mercurial > hg
comparison mercurial/hg.py @ 44657:843418dc0b1b
extensions: refactor function for obtaining disabled extension help
The way this worked before was hgext.__index__ was consulted.
This file appears to only be present on some Windows distributions.
This file contains a dict mapping extension name to its summary line,
not its full docstring.
The problem with this is that code in the help system was calling
this function to resolve help text. If hgext.__index__ was present,
only the summary line would be displayed. If not, the full extension
help would be printed.
This commit changes the function to not use hgext.__index__ such that
it always returns the full extension help text.
As a result of this change, test-extension.t and test-qrecord.t
now pass when run from environments that have an hgext.__index__.
Differential Revision: https://phab.mercurial-scm.org/D8344
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sun, 29 Mar 2020 14:22:07 -0700 |
parents | 6a8738dc4a01 |
children | b7808443ed6a |
comparison
equal
deleted
inserted
replaced
44656:15aef805619d | 44657:843418dc0b1b |
---|---|
693 # requirement is added. If the extension is explicitly disabled but the | 693 # requirement is added. If the extension is explicitly disabled but the |
694 # requirement is set, the clone aborts early, before transferring any | 694 # requirement is set, the clone aborts early, before transferring any |
695 # data. | 695 # data. |
696 createopts[b'lfs'] = True | 696 createopts[b'lfs'] = True |
697 | 697 |
698 if extensions.disabledext(b'lfs'): | 698 if extensions.disabled_help(b'lfs'): |
699 ui.status( | 699 ui.status( |
700 _( | 700 _( |
701 b'(remote is using large file support (lfs), but it is ' | 701 b'(remote is using large file support (lfs), but it is ' |
702 b'explicitly disabled in the local configuration)\n' | 702 b'explicitly disabled in the local configuration)\n' |
703 ) | 703 ) |