~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commands.py

  • Committer: Martin Pool
  • Date: 2011-07-04 21:10:37 UTC
  • mto: (6034.1.1 filter-tree)
  • mto: This revision was merged to the branch mainline in revision 6035.
  • Revision ID: mbp@canonical.com-20110704211037-ro3417imj3oqnqxp
Support exporting tarballs from ContentFilterTree

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
 
167
177
def _register_builtin_commands():
168
178
    if builtin_command_registry.keys():
169
179
        # only load once
432
442
        """
433
443
        self._operation.cleanup_now()
434
444
 
 
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
 
435
458
    def _usage(self):
436
459
        """Return single-line grammar for this command.
437
460
 
700
723
                del self._operation
701
724
        self.run = run
702
725
 
 
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
 
703
731
    def run(self):
704
732
        """Actually run the command.
705
733
 
950
978
 
951
979
def apply_lsprofiled(filename, the_callable, *args, **kwargs):
952
980
    from bzrlib.lsprof import profile
953
 
    ret, stats = profile(exception_to_return_code, the_callable,
954
 
                         *args, **kwargs)
 
981
    ret, stats = profile(exception_to_return_code, the_callable, *args, **kwargs)
955
982
    stats.sort()
956
983
    if filename is None:
957
984
        stats.pprint()
961
988
    return ret
962
989
 
963
990
 
 
991
@deprecated_function(deprecated_in((2, 2, 0)))
 
992
def shlex_split_unicode(unsplit):
 
993
    return cmdline.split(unsplit)
 
994
 
 
995
 
964
996
def get_alias(cmd, config=None):
965
997
    """Return an expanded alias, or None if no alias exists.
966
998