Rev 6031: Remove ``diff.get_trees_and_branches_to_diff`` deprecated in 2.2.0 and the corrsponding tests. in file:///home/vila/src/bzr/cleanup/trace-deprecations/

Vincent Ladeuil v.ladeuil+lp at free.fr
Fri Jul 15 15:10:38 UTC 2011


At file:///home/vila/src/bzr/cleanup/trace-deprecations/

------------------------------------------------------------
revno: 6031
revision-id: v.ladeuil+lp at free.fr-20110715151038-3t48vnp2p4ivjyuu
parent: v.ladeuil+lp at free.fr-20110715142720-v3wjh5mfrusp9278
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: trace-deprecations
timestamp: Fri 2011-07-15 17:10:38 +0200
message:
  Remove ``diff.get_trees_and_branches_to_diff`` deprecated in 2.2.0 and the corrsponding tests.
-------------- next part --------------
=== modified file 'bzrlib/diff.py'
--- a/bzrlib/diff.py	2011-05-19 10:51:37 +0000
+++ b/bzrlib/diff.py	2011-07-15 15:10:38 +0000
@@ -288,39 +288,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 +403,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_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 'doc/en/release-notes/bzr-2.5.txt'
--- a/doc/en/release-notes/bzr-2.5.txt	2011-07-15 14:27:20 +0000
+++ b/doc/en/release-notes/bzr-2.5.txt	2011-07-15 15:10:38 +0000
@@ -58,7 +58,9 @@
 
 * Remove ``commands._builtin_commands``, ``commands.shlex_split_unicode``,
   ``Command._maybe_expand_globs`` and ``Command.run_direct`` deprecated in
-  2.10 and 2.2.0 and one corresponding test. (Vincent Ladeuil)
+  2.10 and 2.2.0. (Vincent Ladeuil)
+
+* Remove ``diff.get_trees_and_branches_to_diff`` deprecated in 2.2.0.
 
 * Remove ``trace.info``, ``trace.error`` and ``trace.show_log_error``
   deprecated in 2.1.0. (Vincent Ladeuil)



More information about the bazaar-commits mailing list