~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commands.py

  • Committer: Vincent Ladeuil
  • Date: 2011-08-12 09:49:24 UTC
  • mfrom: (6015.9.10 2.4)
  • mto: This revision was merged to the branch mainline in revision 6066.
  • Revision ID: v.ladeuil+lp@free.fr-20110812094924-knc5s0g7vs31a2f1
Merge 2.4 into trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
164
164
    return cmd[4:].replace('_','-')
165
165
 
166
166
 
167
 
@deprecated_function(deprecated_in((2, 2, 0)))
168
 
def _builtin_commands():
169
 
    """Return a dict of {name: cmd_class} for builtin commands.
170
 
 
171
 
    :deprecated: Use the builtin_command_registry registry instead
172
 
    """
173
 
    # return dict(name: cmd_class)
174
 
    return dict(builtin_command_registry.items())
175
 
 
176
 
 
177
167
def _register_builtin_commands():
178
168
    if builtin_command_registry.keys():
179
169
        # only load once
442
432
        """
443
433
        self._operation.cleanup_now()
444
434
 
445
 
    @deprecated_method(deprecated_in((2, 1, 0)))
446
 
    def _maybe_expand_globs(self, file_list):
447
 
        """Glob expand file_list if the platform does not do that itself.
448
 
 
449
 
        Not used anymore, now that the bzr command-line parser globs on
450
 
        Windows.
451
 
 
452
 
        :return: A possibly empty list of unicode paths.
453
 
 
454
 
        Introduced in bzrlib 0.18.
455
 
        """
456
 
        return file_list
457
 
 
458
435
    def _usage(self):
459
436
        """Return single-line grammar for this command.
460
437
 
723
700
                del self._operation
724
701
        self.run = run
725
702
 
726
 
    @deprecated_method(deprecated_in((2, 2, 0)))
727
 
    def run_direct(self, *args, **kwargs):
728
 
        """Deprecated thunk from bzrlib 2.1."""
729
 
        return self.run(*args, **kwargs)
730
 
 
731
703
    def run(self):
732
704
        """Actually run the command.
733
705
 
978
950
 
979
951
def apply_lsprofiled(filename, the_callable, *args, **kwargs):
980
952
    from bzrlib.lsprof import profile
981
 
    ret, stats = profile(exception_to_return_code, the_callable, *args, **kwargs)
 
953
    ret, stats = profile(exception_to_return_code, the_callable,
 
954
                         *args, **kwargs)
982
955
    stats.sort()
983
956
    if filename is None:
984
957
        stats.pprint()
988
961
    return ret
989
962
 
990
963
 
991
 
@deprecated_function(deprecated_in((2, 2, 0)))
992
 
def shlex_split_unicode(unsplit):
993
 
    return cmdline.split(unsplit)
994
 
 
995
 
 
996
964
def get_alias(cmd, config=None):
997
965
    """Return an expanded alias, or None if no alias exists.
998
966