Mercurial > evolve
changeset 6305:77ce98287dc2
topic: drop helpcategory 4.7 compat, use helpcategory keyword directly
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Thu, 11 Aug 2022 11:32:30 +0400 |
parents | c00332abb66b |
children | 075f365a53cf |
files | hgext3rd/topic/__init__.py hgext3rd/topic/compat.py |
diffstat | 2 files changed, 4 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/topic/__init__.py Mon Aug 15 18:45:55 2022 +0400 +++ b/hgext3rd/topic/__init__.py Thu Aug 11 11:32:30 2022 +0400 @@ -192,7 +192,6 @@ from . import ( common, - compat, constants, destination, discovery, @@ -847,7 +846,8 @@ (b'', b'current', None, b'display the current topic only'), ] + commands.formatteropts, _(b'hg topics [OPTION]... [-r REV]... [TOPIC]'), - **compat.helpcategorykwargs('CATEGORY_CHANGE_ORGANIZATION')) + helpcategory=registrar.command.CATEGORY_CHANGE_ORGANIZATION, +) def topics(ui, repo, topic=None, **opts): """View current topic, set current topic, change topic for a set of revisions, or see all topics. @@ -998,7 +998,8 @@ _(b'display data about children outside of the stack')) ] + commands.formatteropts, _(b'hg stack [TOPIC]'), - **compat.helpcategorykwargs('CATEGORY_CHANGE_NAVIGATION')) + helpcategory=registrar.command.CATEGORY_CHANGE_NAVIGATION, +) def cmdstack(ui, repo, topic=b'', **opts): """list all changesets in a topic and other information
--- a/hgext3rd/topic/compat.py Mon Aug 15 18:45:55 2022 +0400 +++ b/hgext3rd/topic/compat.py Thu Aug 11 11:32:30 2022 +0400 @@ -11,7 +11,6 @@ cmdutil, extensions, pycompat, - registrar, util, ) @@ -24,15 +23,6 @@ return branchmap.iteritems() # py3-transform: on -# help category compatibility -# hg <= 4.7 (c303d65d2e34) -def helpcategorykwargs(categoryname): - """Backwards-compatible specification of the helpategory argument.""" - category = getattr(registrar.command, categoryname, None) - if not category: - return {} - return {'helpcategory': category} - # nodemap.get and index.[has_node|rev|get_rev] # hg <= 5.2 (02802fa87b74) def getgetrev(cl):