Mercurial > hg
changeset 45960:bc1b4eb21da9
helptext: document the mechanism for extensions to report a version
Differential Revision: https://phab.mercurial-scm.org/D9448
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sat, 28 Nov 2020 00:25:04 -0500 |
parents | 3a3a510617e5 |
children | 35d5d1d8bcf0 |
files | mercurial/helptext/internals/extensions.txt |
diffstat | 1 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/helptext/internals/extensions.txt Sat Nov 28 13:42:55 2020 +0100 +++ b/mercurial/helptext/internals/extensions.txt Sat Nov 28 00:25:04 2020 -0500 @@ -322,6 +322,15 @@ 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? ============================