# HG changeset patch # User Matt Harbison # Date 2020-11-28 05:25:04 # Node ID bc1b4eb21da984067fe3966a6d3aec8f80cd0ec8 # Parent 3a3a510617e573d3ee8d9eee3c5189a551f5b8c4 helptext: document the mechanism for extensions to report a version Differential Revision: https://phab.mercurial-scm.org/D9448 diff --git a/mercurial/helptext/internals/extensions.txt b/mercurial/helptext/internals/extensions.txt --- a/mercurial/helptext/internals/extensions.txt +++ b/mercurial/helptext/internals/extensions.txt @@ -322,6 +322,15 @@ with the ``minimumhgversion`` variable:: Older clients will print a warning that the extension requires a new version, instead of attempting to load it. +The extension itself can be assigned a version value through one of two module +attributes, and will be displayed in crash reports and :hg:`version -v`:: + + * ``__version__`` is a plain value + * ``getversion`` is a no argument ``Callable`` that returns a value + +In both cases, the value must be either a byte string, or a list or tuple of +numeric values which will be joined with ``.``. + Wrap up: what belongs where? ============================