Show More
@@ -341,10 +341,9 b" if __name__ == '__main__':" | |||
|
341 | 341 | check(mqoutsidechanges) |
|
342 | 342 | dbg = open('dbgui.py', 'w') |
|
343 | 343 | dbg.write('from mercurial import cmdutil, commands\n' |
|
344 | 'commands.norepo += " debuggetpass"\n' | |
|
345 | 344 | 'cmdtable = {}\n' |
|
346 | 345 | 'command = cmdutil.command(cmdtable)\n' |
|
347 | '@command("debuggetpass")\n' | |
|
346 | '@command("debuggetpass", norepo=True)\n' | |
|
348 | 347 | 'def debuggetpass(ui):\n' |
|
349 | 348 | ' ui.write("%s\\n" % ui.getpass())\n') |
|
350 | 349 | dbg.close() |
@@ -18,11 +18,10 b' Test basic extension support' | |||
|
18 | 18 | > def foo(ui, *args, **kwargs): |
|
19 | 19 | > ui.write("Foo\\n") |
|
20 | 20 | > |
|
21 | > @command('bar', [], 'hg bar') | |
|
21 | > @command('bar', [], 'hg bar', norepo=True) | |
|
22 | 22 | > def bar(ui, *args, **kwargs): |
|
23 | 23 | > ui.write("Bar\\n") |
|
24 | 24 | > |
|
25 | > commands.norepo += ' bar' | |
|
26 | 25 | > EOF |
|
27 | 26 | $ abspath=`pwd`/foobar.py |
|
28 | 27 | |
@@ -481,11 +480,10 b' Test help topic with same name as extens' | |||
|
481 | 480 | > command = cmdutil.command(cmdtable) |
|
482 | 481 | > """multirevs extension |
|
483 | 482 | > Big multi-line module docstring.""" |
|
484 | > @command('multirevs', [], 'ARG') | |
|
483 | > @command('multirevs', [], 'ARG', norepo=True) | |
|
485 | 484 | > def multirevs(ui, repo, arg, *args, **opts): |
|
486 | 485 | > """multirevs command""" |
|
487 | 486 | > pass |
|
488 | > commands.norepo += ' multirevs' | |
|
489 | 487 | > EOF |
|
490 | 488 | $ echo "multirevs = multirevs.py" >> $HGRCPATH |
|
491 | 489 | |
@@ -537,12 +535,11 b' Issue811: Problem loading extensions twi' | |||
|
537 | 535 | > cmdtable = {} |
|
538 | 536 | > command = cmdutil.command(cmdtable) |
|
539 | 537 | > |
|
540 | > @command('debugextensions', [], 'hg debugextensions') | |
|
538 | > @command('debugextensions', [], 'hg debugextensions', norepo=True) | |
|
541 | 539 | > def debugextensions(ui): |
|
542 | 540 | > "yet another debug command" |
|
543 | 541 | > ui.write("%s\n" % '\n'.join([x for x, y in extensions.extensions()])) |
|
544 | 542 | > |
|
545 | > commands.norepo += " debugextensions" | |
|
546 | 543 | > EOF |
|
547 | 544 | $ echo "debugissue811 = $debugpath" >> $HGRCPATH |
|
548 | 545 | $ echo "mq=" >> $HGRCPATH |
@@ -631,11 +628,10 b' Broken disabled extension and command:' | |||
|
631 | 628 | > command = cmdutil.command(cmdtable) |
|
632 | 629 | > class Bogon(Exception): pass |
|
633 | 630 | > |
|
634 | > @command('throw', [], 'hg throw') | |
|
631 | > @command('throw', [], 'hg throw', norepo=True) | |
|
635 | 632 | > def throw(ui, **opts): |
|
636 | 633 | > """throws an exception""" |
|
637 | 634 | > raise Bogon() |
|
638 | > commands.norepo += " throw" | |
|
639 | 635 | > EOF |
|
640 | 636 | No declared supported version, extension complains: |
|
641 | 637 | $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*' |
@@ -639,12 +639,12 b' Test command without options' | |||
|
639 | 639 | > [('', 'longdesc', 3, 'x'*90), |
|
640 | 640 | > ('n', '', None, 'normal desc'), |
|
641 | 641 | > ('', 'newline', '', 'line1\nline2')], |
|
642 |
> 'hg nohelp' |
|
|
642 | > 'hg nohelp', | |
|
643 | > norepo=True) | |
|
643 | 644 | > @command('debugoptDEP', [('', 'dopt', None, 'option is DEPRECATED')]) |
|
644 | 645 | > def nohelp(ui, *args, **kwargs): |
|
645 | 646 | > pass |
|
646 | 647 | > |
|
647 | > commands.norepo += ' nohelp' | |
|
648 | 648 | > EOF |
|
649 | 649 | $ echo '[extensions]' >> $HGRCPATH |
|
650 | 650 | $ echo "helpext = `pwd`/helpext.py" >> $HGRCPATH |
@@ -18,7 +18,8 b'' | |||
|
18 | 18 | > [('', 'total', '', 'override for total'), |
|
19 | 19 | > ('', 'nested', False, 'show nested results'), |
|
20 | 20 | > ('', 'parallel', False, 'show parallel sets of results')], |
|
21 |
> 'hg loop LOOPS' |
|
|
21 | > 'hg loop LOOPS', | |
|
22 | > norepo=True) | |
|
22 | 23 | > def loop(ui, loops, **opts): |
|
23 | 24 | > loops = int(loops) |
|
24 | 25 | > total = None |
@@ -46,7 +47,6 b'' | |||
|
46 | 47 | > 'nested', None, 'nested.done', 'nestnum', nested_steps) |
|
47 | 48 | > ui.progress('loop', None, 'loop.done', 'loopnum', total) |
|
48 | 49 | > |
|
49 | > commands.norepo += " loop" | |
|
50 | 50 | > EOF |
|
51 | 51 | |
|
52 | 52 | $ cp $HGRCPATH $HGRCPATH.orig |
General Comments 0
You need to be logged in to leave comments.
Login now