Mercurial > public > mercurial-scm > hg
comparison tests/test-commandserver.py @ 21773:26d2fb899637
tests: define norepo in command decorator
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sun, 04 May 2014 22:07:45 -0700 |
parents | 9336bc7dca8e |
children | 68f2f8bfe9ae |
comparison
equal
deleted
inserted
replaced
21772:5a4d1a6c605f | 21773:26d2fb899637 |
---|---|
339 hgrc.write('[extensions]\nmq=\n') | 339 hgrc.write('[extensions]\nmq=\n') |
340 hgrc.close() | 340 hgrc.close() |
341 check(mqoutsidechanges) | 341 check(mqoutsidechanges) |
342 dbg = open('dbgui.py', 'w') | 342 dbg = open('dbgui.py', 'w') |
343 dbg.write('from mercurial import cmdutil, commands\n' | 343 dbg.write('from mercurial import cmdutil, commands\n' |
344 'commands.norepo += " debuggetpass"\n' | |
345 'cmdtable = {}\n' | 344 'cmdtable = {}\n' |
346 'command = cmdutil.command(cmdtable)\n' | 345 'command = cmdutil.command(cmdtable)\n' |
347 '@command("debuggetpass")\n' | 346 '@command("debuggetpass", norepo=True)\n' |
348 'def debuggetpass(ui):\n' | 347 'def debuggetpass(ui):\n' |
349 ' ui.write("%s\\n" % ui.getpass())\n') | 348 ' ui.write("%s\\n" % ui.getpass())\n') |
350 dbg.close() | 349 dbg.close() |
351 hgrc = open('.hg/hgrc', 'a') | 350 hgrc = open('.hg/hgrc', 'a') |
352 hgrc.write('[extensions]\ndbgui=dbgui.py\n') | 351 hgrc.write('[extensions]\ndbgui=dbgui.py\n') |