/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/commands.py

  • Committer: Jelmer Vernooij
  • Date: 2018-07-26 01:01:49 UTC
  • mto: This revision was merged to the branch mainline in revision 7057.
  • Revision ID: jelmer@jelmer.uk-20180726010149-vsr0rpqe65nngig3
Fix some help tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
import os
27
27
import sys
28
28
 
 
29
from . import (
 
30
    i18n,
 
31
    option,
 
32
    osutils,
 
33
    )
 
34
 
29
35
from .lazy_import import lazy_import
30
36
lazy_import(globals(), """
31
37
import errno
37
43
    cleanup,
38
44
    cmdline,
39
45
    debug,
40
 
    i18n,
41
 
    option,
42
 
    osutils,
43
46
    trace,
44
47
    ui,
45
48
    )
54
57
from .sixish import (
55
58
    string_types,
56
59
    text_type,
 
60
    viewvalues,
57
61
    )
58
62
 
59
63
 
581
585
        # XXX: optparse implicitly rewraps the help, and not always perfectly,
582
586
        # so we get <https://bugs.launchpad.net/bzr/+bug/249908>.  -- mbp
583
587
        # 20090319
584
 
        parser = option.get_optparser(self.options())
 
588
        parser = option.get_optparser([v for k, v in sorted(self.options().items())])
585
589
        options = parser.format_option_help()
586
590
        # FIXME: According to the spec, ReST option lists actually don't
587
591
        # support options like --1.14 so that causes syntax errors (in Sphinx
890
894
    they take, and which commands will accept them.
891
895
    """
892
896
    # TODO: make it a method of the Command?
893
 
    parser = option.get_optparser(command.options())
 
897
    parser = option.get_optparser(
 
898
            [v for k, v in sorted(command.options().items())])
894
899
    if alias_argv is not None:
895
900
        args = alias_argv + argv
896
901
    else: