# HG changeset patch # User mr # Date 1520356730 28800 # Node ID fa743d5b86983c457adc0abce9f0ee909ba44145 # Parent eb125f25a40fc3bda120e50d746bbba883f127b0 Use the @command decorator in verlist.py diff -r eb125f25a40f -r fa743d5b8698 tests/verlist.py --- a/tests/verlist.py Tue Mar 06 09:18:45 2018 -0800 +++ b/tests/verlist.py Tue Mar 06 09:18:50 2018 -0800 @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -29,7 +29,7 @@ """ -from mercurial import commands +from mercurial import cmdutil from mercurial import context from mercurial import ui from mercurial.i18n import _ @@ -73,6 +73,13 @@ tags.append(lastmicro) return tags +cmdtable = { } +command = cmdutil.command(cmdtable) + +@command('verlist', + [('l', 'lastmicro', None, + _('list only the last micro version in a minor version family'))], + _('[rev_range] ...')) def verlist(ui, repo, *pats, **opts): """List the tags in a repo, separated by spaces. @@ -94,11 +101,3 @@ tags = _lastmicro(tags) ui.write(' '.join(tags)) ui.write('\n') - -cmdtable = { - '^verlist': - (verlist, - [('l', 'lastmicro', None, - _('list only the last micro version in a minor version family'))], - _('[rev_range] ...')) - }