~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commands.py

  • Committer: Martin
  • Date: 2010-05-16 15:18:43 UTC
  • mfrom: (5235 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5239.
  • Revision ID: gzlist@googlemail.com-20100516151843-lu53u7caehm3ie3i
Merge bzr.dev to resolve conflicts in NEWS and _chk_map_pyx

Show diffs side-by-side

added added

removed removed

Lines of Context:
407
407
 
408
408
    def __init__(self):
409
409
        """Construct an instance of this command."""
410
 
        if self.__doc__ == Command.__doc__:
411
 
            warn("No help message set for %r" % self)
 
410
        if self.__doc__ == Command.__doc__ or not self.__doc__:
 
411
            raise ValueError("No help message set for %r" % self)
412
412
        # List of standard options directly supported
413
413
        self.supported_std_options = []
414
414
        self._setup_run()
483
483
        """
484
484
        doc = self.help()
485
485
        if doc is None:
486
 
            raise NotImplementedError("sorry, no detailed help yet for %r" % self.name())
 
486
            raise NotImplementedError(
 
487
                "self.help() returned None -  no detailed help yet for %r" %
 
488
                self.name())
487
489
 
488
490
        # Extract the summary (purpose) and sections out from the text
489
491
        purpose,sections,order = self._get_help_parts(doc)
1077
1079
    if not opt_no_aliases:
1078
1080
        alias_argv = get_alias(argv[0])
1079
1081
        if alias_argv:
1080
 
            user_encoding = osutils.get_user_encoding()
1081
 
            alias_argv = [a.decode(user_encoding) for a in alias_argv]
1082
1082
            argv[0] = alias_argv.pop(0)
1083
1083
 
1084
1084
    cmd = argv.pop(0)
1085
 
    # We want only 'ascii' command names, but the user may have typed
1086
 
    # in a Unicode name. In that case, they should just get a
1087
 
    # 'command not found' error later.
1088
 
 
1089
1085
    cmd_obj = get_cmd_object(cmd, plugins_override=not opt_builtin)
1090
1086
    run = cmd_obj.run_argv_aliases
1091
1087
    run_argv = [argv, alias_argv]