comparison hgext3rd/topic/compat.py @ 4894:f9743b13de6d

help: categorizing evolve and topic commands This makes them show up under the right categories in 'hg help'. Differential Revision: https://phab.mercurial-scm.org/D6999
author Rodrigo Damazio <rdamazio@google.com>
date Sun, 06 Oct 2019 02:30:12 -0400
parents 03690f8d2b0a
children bb2b4f6c99dc
comparison
equal deleted inserted replaced
4893:d3ad50b40a4e 4894:f9743b13de6d
8 from __future__ import absolute_import 8 from __future__ import absolute_import
9 9
10 from mercurial import ( 10 from mercurial import (
11 obsolete, 11 obsolete,
12 pycompat, 12 pycompat,
13 registrar,
13 ) 14 )
14 15
15 getmarkers = None 16 getmarkers = None
16 successorssets = None 17 successorssets = None
17 try: 18 try:
32 else: 33 else:
33 # py3-transform: off 34 # py3-transform: off
34 def branchmapitems(branchmap): 35 def branchmapitems(branchmap):
35 return branchmap.iteritems() 36 return branchmap.iteritems()
36 # py3-transform: on 37 # py3-transform: on
38
39 # help category compatibility
40 # hg <= 4.7 (c303d65d2e34)
41 def helpcategorykwargs(categoryname):
42 """Backwards-compatible specification of the helpategory argument."""
43 category = getattr(registrar.command, categoryname, None)
44 if not category:
45 return {}
46 return {'helpcategory': category}