Rev 6030: (vila) Remove commands, diff and trace deprecated stuff (Vincent Ladeuil) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Sat Jul 16 10:47:48 UTC 2011


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 6030 [merge]
revision-id: pqm at pqm.ubuntu.com-20110716104745-8n8mgnn7ld7dcf8w
parent: pqm at pqm.ubuntu.com-20110715150852-zin0b58lmxzw0ym6
parent: v.ladeuil+lp at free.fr-20110715153101-spjt5l36mkwhuw9o
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Sat 2011-07-16 10:47:45 +0000
message:
  (vila) Remove commands, diff and trace deprecated stuff (Vincent Ladeuil)
modified:
  bzrlib/commands.py             bzr.py-20050309040720-d10f4714595cf8c3
  bzrlib/diff.py                 diff.py-20050309040759-26944fbbf2ebbf36
  bzrlib/tests/test_commands.py  test_command.py-20051019190109-3b17be0f52eaa7a8
  bzrlib/tests/test_diff.py      testdiff.py-20050727164403-d1a3496ebb12e339
  bzrlib/trace.py                trace.py-20050309040759-c8ed824bdcd4748a
  doc/en/release-notes/bzr-2.5.txt bzr2.5.txt-20110708125756-587p0hpw7oke4h05-1
=== modified file 'bzrlib/commands.py'
--- a/bzrlib/commands.py	2011-06-27 15:36:58 +0000
+++ b/bzrlib/commands.py	2011-07-15 14:27:20 +0000
@@ -164,16 +164,6 @@
     return cmd[4:].replace('_','-')
 
 
- at deprecated_function(deprecated_in((2, 2, 0)))
-def _builtin_commands():
-    """Return a dict of {name: cmd_class} for builtin commands.
-
-    :deprecated: Use the builtin_command_registry registry instead
-    """
-    # return dict(name: cmd_class)
-    return dict(builtin_command_registry.items())
-
-
 def _register_builtin_commands():
     if builtin_command_registry.keys():
         # only load once
@@ -442,19 +432,6 @@
         """
         self._operation.cleanup_now()
 
-    @deprecated_method(deprecated_in((2, 1, 0)))
-    def _maybe_expand_globs(self, file_list):
-        """Glob expand file_list if the platform does not do that itself.
-
-        Not used anymore, now that the bzr command-line parser globs on
-        Windows.
-
-        :return: A possibly empty list of unicode paths.
-
-        Introduced in bzrlib 0.18.
-        """
-        return file_list
-
     def _usage(self):
         """Return single-line grammar for this command.
 
@@ -723,11 +700,6 @@
                 del self._operation
         self.run = run
 
-    @deprecated_method(deprecated_in((2, 2, 0)))
-    def run_direct(self, *args, **kwargs):
-        """Deprecated thunk from bzrlib 2.1."""
-        return self.run(*args, **kwargs)
-
     def run(self):
         """Actually run the command.
 
@@ -978,7 +950,8 @@
 
 def apply_lsprofiled(filename, the_callable, *args, **kwargs):
     from bzrlib.lsprof import profile
-    ret, stats = profile(exception_to_return_code, the_callable, *args, **kwargs)
+    ret, stats = profile(exception_to_return_code, the_callable,
+                         *args, **kwargs)
     stats.sort()
     if filename is None:
         stats.pprint()
@@ -988,11 +961,6 @@
     return ret
 
 
- at deprecated_function(deprecated_in((2, 2, 0)))
-def shlex_split_unicode(unsplit):
-    return cmdline.split(unsplit)
-
-
 def get_alias(cmd, config=None):
     """Return an expanded alias, or None if no alias exists.
 

=== modified file 'bzrlib/diff.py'
--- a/bzrlib/diff.py	2011-05-19 10:51:37 +0000
+++ b/bzrlib/diff.py	2011-07-15 15:31:01 +0000
@@ -44,10 +44,6 @@
 from bzrlib.registry import (
     Registry,
     )
-from bzrlib.symbol_versioning import (
-    deprecated_function,
-    deprecated_in,
-    )
 from bzrlib.trace import mutter, note, warning
 
 
@@ -288,39 +284,6 @@
                         new_abspath, e)
 
 
- at deprecated_function(deprecated_in((2, 2, 0)))
-def get_trees_and_branches_to_diff(path_list, revision_specs, old_url, new_url,
-                                   apply_view=True):
-    """Get the trees and specific files to diff given a list of paths.
-
-    This method works out the trees to be diff'ed and the files of
-    interest within those trees.
-
-    :param path_list:
-        the list of arguments passed to the diff command
-    :param revision_specs:
-        Zero, one or two RevisionSpecs from the diff command line,
-        saying what revisions to compare.
-    :param old_url:
-        The url of the old branch or tree. If None, the tree to use is
-        taken from the first path, if any, or the current working tree.
-    :param new_url:
-        The url of the new branch or tree. If None, the tree to use is
-        taken from the first path, if any, or the current working tree.
-    :param apply_view:
-        if True and a view is set, apply the view or check that the paths
-        are within it
-    :returns:
-        a tuple of (old_tree, new_tree, old_branch, new_branch,
-        specific_files, extra_trees) where extra_trees is a sequence of
-        additional trees to search in for file-ids.  The trees and branches
-        are not locked.
-    """
-    op = cleanup.OperationWithCleanups(get_trees_and_branches_to_diff_locked)
-    return op.run_simple(path_list, revision_specs, old_url, new_url,
-            op.add_cleanup, apply_view=apply_view)
-    
-
 def get_trees_and_branches_to_diff_locked(
     path_list, revision_specs, old_url, new_url, add_cleanup, apply_view=True):
     """Get the trees and specific files to diff given a list of paths.
@@ -436,7 +399,8 @@
     extra_trees = None
     if working_tree is not None and working_tree not in (old_tree, new_tree):
         extra_trees = (working_tree,)
-    return old_tree, new_tree, old_branch, new_branch, specific_files, extra_trees
+    return (old_tree, new_tree, old_branch, new_branch,
+            specific_files, extra_trees)
 
 
 def _get_tree_to_diff(spec, tree=None, branch=None, basis_is_default=True):

=== modified file 'bzrlib/tests/test_commands.py'
--- a/bzrlib/tests/test_commands.py	2011-04-19 03:23:05 +0000
+++ b/bzrlib/tests/test_commands.py	2011-07-15 14:27:20 +0000
@@ -354,11 +354,3 @@
         cmds = list(commands.all_command_names())
         self.assertEqual(['called'], hook_calls)
         self.assertSubset(['foo', 'bar'], cmds)
-
-
-class TestDeprecations(tests.TestCase):
-
-    def test_shlex_split_unicode_deprecation(self):
-        res = self.applyDeprecated(
-                symbol_versioning.deprecated_in((2, 2, 0)),
-                commands.shlex_split_unicode, 'whatever')

=== modified file 'bzrlib/tests/test_diff.py'
--- a/bzrlib/tests/test_diff.py	2011-05-18 16:11:05 +0000
+++ b/bzrlib/tests/test_diff.py	2011-07-15 15:10:38 +0000
@@ -1470,9 +1470,7 @@
 class TestGetTreesAndBranchesToDiffLocked(tests.TestCaseWithTransport):
 
     def call_gtabtd(self, path_list, revision_specs, old_url, new_url):
-        """Call get_trees_and_branches_to_diff_locked.  Overridden by
-        TestGetTreesAndBranchesToDiff.
-        """
+        """Call get_trees_and_branches_to_diff_locked."""
         return diff.get_trees_and_branches_to_diff_locked(
             path_list, revision_specs, old_url, new_url, self.addCleanup)
 
@@ -1515,14 +1513,3 @@
         self.assertEqual(tree.branch.base, new_branch.base)
         self.assertIs(None, specific_files)
         self.assertEqual(tree.basedir, extra_trees[0].basedir)
-
-
-class TestGetTreesAndBranchesToDiff(TestGetTreesAndBranchesToDiffLocked):
-    """Apply the tests for get_trees_and_branches_to_diff_locked to the
-    deprecated get_trees_and_branches_to_diff function.
-    """
-
-    def call_gtabtd(self, path_list, revision_specs, old_url, new_url):
-        return self.applyDeprecated(
-            deprecated_in((2, 2, 0)), diff.get_trees_and_branches_to_diff,
-            path_list, revision_specs, old_url, new_url)

=== modified file 'bzrlib/trace.py'
--- a/bzrlib/trace.py	2011-05-19 09:32:38 +0000
+++ b/bzrlib/trace.py	2011-07-15 14:13:32 +0000
@@ -71,11 +71,6 @@
 
 import bzrlib
 
-from bzrlib.symbol_versioning import (
-    deprecated_function,
-    deprecated_in,
-    )
-
 lazy_import(globals(), """
 from bzrlib import (
     debug,
@@ -130,24 +125,6 @@
     _bzr_logger.warning(*args, **kwargs)
 
 
- at deprecated_function(deprecated_in((2, 1, 0)))
-def info(*args, **kwargs):
-    """Deprecated: use trace.note instead."""
-    note(*args, **kwargs)
-
-
- at deprecated_function(deprecated_in((2, 1, 0)))
-def log_error(*args, **kwargs):
-    """Deprecated: use bzrlib.trace.show_error instead"""
-    _bzr_logger.error(*args, **kwargs)
-
-
- at deprecated_function(deprecated_in((2, 1, 0)))
-def error(*args, **kwargs):
-    """Deprecated: use bzrlib.trace.show_error instead"""
-    _bzr_logger.error(*args, **kwargs)
-
-
 def show_error(*args, **kwargs):
     """Show an error message to the user.
 

=== modified file 'doc/en/release-notes/bzr-2.5.txt'
--- a/doc/en/release-notes/bzr-2.5.txt	2011-07-15 13:59:45 +0000
+++ b/doc/en/release-notes/bzr-2.5.txt	2011-07-15 15:12:52 +0000
@@ -59,11 +59,20 @@
 * Remove ``AtomicFile.closed`` which has been deprecated in bzr 0.10.
   (Vincent Ladeuil)
 
-* Remove log.calculate_view_revisions, log._filter_revision_range,
-  log.get_view_revisions which have been deprecated in bzr 2.1.0. Also
-  remove log.show_one_log which were never properly deprecated but wasn't
+* Remove ``commands._builtin_commands``, ``commands.shlex_split_unicode``,
+  ``Command._maybe_expand_globs`` and ``Command.run_direct`` deprecated in
+  2.10 and 2.2.0. (Vincent Ladeuil)
+
+* Remove ``diff.get_trees_and_branches_to_diff`` deprecated in 2.2.0.
+
+* Remove ``log.calculate_view_revisions``, ``log._filter_revision_range``,
+  ``log.get_view_revisions`` which have been deprecated in bzr 2.1.0. Also
+  remove ``log.show_one_log`` which was never properly deprecated but wasn't
   used and is easy to inline if needed. (Vincent Ladeuil)
 
+* Remove ``trace.info``, ``trace.error`` and ``trace.show_log_error``
+  deprecated in 2.1.0. (Vincent Ladeuil)
+
 Internals
 *********
 




More information about the bazaar-commits mailing list