comparison mercurial/debugcommands.py @ 32376: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 67026d65a4fc
children a275186b989a
comparison
equal deleted inserted replaced
32375:ff874d34c856 32376:46ba2cdda476
49 merge as mergemod, 49 merge as mergemod,
50 obsolete, 50 obsolete,
51 policy, 51 policy,
52 pvec, 52 pvec,
53 pycompat, 53 pycompat,
54 registrar,
54 repair, 55 repair,
55 revlog, 56 revlog,
56 revset, 57 revset,
57 revsetlang, 58 revsetlang,
58 scmutil, 59 scmutil,
70 71
71 release = lockmod.release 72 release = lockmod.release
72 73
73 # We reuse the command table from commands because it is easier than 74 # We reuse the command table from commands because it is easier than
74 # teaching dispatch about multiple tables. 75 # teaching dispatch about multiple tables.
75 command = cmdutil.command(commands.table) 76 command = registrar.command(commands.table)
76 77
77 @command('debugancestor', [], _('[INDEX] REV1 REV2'), optionalrepo=True) 78 @command('debugancestor', [], _('[INDEX] REV1 REV2'), optionalrepo=True)
78 def debugancestor(ui, repo, *args): 79 def debugancestor(ui, repo, *args):
79 """find the ancestor revision of two revisions in a given index""" 80 """find the ancestor revision of two revisions in a given index"""
80 if len(args) == 3: 81 if len(args) == 3: