Show More
@@ -485,6 +485,18 b' def _earlygetopt(aliases, args):' | |||||
485 |
|
485 | |||
486 | The values are listed in the order they appear in args. |
|
486 | The values are listed in the order they appear in args. | |
487 | The options and values are removed from args. |
|
487 | The options and values are removed from args. | |
|
488 | ||||
|
489 | >>> args = ['x', '--cwd', 'foo', 'y'] | |||
|
490 | >>> _earlygetopt(['--cwd'], args), args | |||
|
491 | (['foo'], ['x', 'y']) | |||
|
492 | ||||
|
493 | >>> args = ['x', '-R', 'foo', 'y'] | |||
|
494 | >>> _earlygetopt(['-R'], args), args | |||
|
495 | (['foo'], ['x', 'y']) | |||
|
496 | ||||
|
497 | >>> args = ['x', '-Rbar', 'y'] | |||
|
498 | >>> _earlygetopt(['-R'], args), args | |||
|
499 | (['bar'], ['x', 'y']) | |||
488 | """ |
|
500 | """ | |
489 | try: |
|
501 | try: | |
490 | argcount = args.index("--") |
|
502 | argcount = args.index("--") |
@@ -27,6 +27,9 b' doctest.testmod(mercurial.ui)' | |||||
27 | import mercurial.url |
|
27 | import mercurial.url | |
28 | doctest.testmod(mercurial.url) |
|
28 | doctest.testmod(mercurial.url) | |
29 |
|
29 | |||
|
30 | import mercurial.dispatch | |||
|
31 | doctest.testmod(mercurial.dispatch) | |||
|
32 | ||||
30 | import mercurial.encoding |
|
33 | import mercurial.encoding | |
31 | doctest.testmod(mercurial.encoding) |
|
34 | doctest.testmod(mercurial.encoding) | |
32 |
|
35 |
General Comments 0
You need to be logged in to leave comments.
Login now