comparison tests/test-pager.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 f06d23af6cdf
children 3b569745af6c
comparison
equal deleted inserted replaced
32336:ff874d34c856 32337:46ba2cdda476
221 2 221 2
222 222
223 Pager should not override the exit code of other commands 223 Pager should not override the exit code of other commands
224 224
225 $ cat >> $TESTTMP/fortytwo.py <<'EOF' 225 $ cat >> $TESTTMP/fortytwo.py <<'EOF'
226 > from mercurial import cmdutil, commands 226 > from mercurial import commands, registrar
227 > cmdtable = {} 227 > cmdtable = {}
228 > command = cmdutil.command(cmdtable) 228 > command = registrar.command(cmdtable)
229 > @command('fortytwo', [], 'fortytwo', norepo=True) 229 > @command('fortytwo', [], 'fortytwo', norepo=True)
230 > def fortytwo(ui, *opts): 230 > def fortytwo(ui, *opts):
231 > ui.write('42\n') 231 > ui.write('42\n')
232 > return 42 232 > return 42
233 > EOF 233 > EOF