Mercurial > hg
comparison tests/test-help.t @ 32337:46ba2cdda476
registrar: move cmdutil.command to registrar module (API)
cmdutil.command wasn't a member of the registrar framework only for a
historical reason. Let's make that happen. This patch keeps cmdutil.command
as an alias for extension compatibility.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 09 Jan 2016 23:07:20 +0900 |
parents | ccef71de7d41 |
children | 37863db50414 |
comparison
equal
deleted
inserted
replaced
32336:ff874d34c856 | 32337:46ba2cdda476 |
---|---|
678 (did you mean one of pull, push?) | 678 (did you mean one of pull, push?) |
679 [255] | 679 [255] |
680 | 680 |
681 $ cat > helpext.py <<EOF | 681 $ cat > helpext.py <<EOF |
682 > import os | 682 > import os |
683 > from mercurial import cmdutil, commands | 683 > from mercurial import commands, registrar |
684 > | 684 > |
685 > cmdtable = {} | 685 > cmdtable = {} |
686 > command = cmdutil.command(cmdtable) | 686 > command = registrar.command(cmdtable) |
687 > | 687 > |
688 > @command('nohelp', | 688 > @command('nohelp', |
689 > [('', 'longdesc', 3, 'x'*90), | 689 > [('', 'longdesc', 3, 'x'*90), |
690 > ('n', '', None, 'normal desc'), | 690 > ('n', '', None, 'normal desc'), |
691 > ('', 'newline', '', 'line1\nline2')], | 691 > ('', 'newline', '', 'line1\nline2')], |