Rev 6035: Remove bzrlib.merge deprecated stuff. in file:///home/vila/src/bzr/cleanup/deprecations/

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


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

------------------------------------------------------------
revno: 6035
revision-id: v.ladeuil+lp at free.fr-20110715155532-olvysaomeff17kqw
parent: v.ladeuil+lp at free.fr-20110715153101-spjt5l36mkwhuw9o
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: deprecations
timestamp: Fri 2011-07-15 17:55:32 +0200
message:
  Remove bzrlib.merge deprecated stuff.
-------------- next part --------------
=== modified file 'bzrlib/merge.py'
--- a/bzrlib/merge.py	2011-07-06 09:22:00 +0000
+++ b/bzrlib/merge.py	2011-07-15 15:55:32 +0000
@@ -441,51 +441,6 @@
         revision_id = _mod_revision.ensure_null(revision_id)
         return branch, self.revision_tree(revision_id, branch)
 
-    @deprecated_method(deprecated_in((2, 1, 0)))
-    def ensure_revision_trees(self):
-        if self.this_revision_tree is None:
-            self.this_basis_tree = self.revision_tree(self.this_basis)
-            if self.this_basis == self.this_rev_id:
-                self.this_revision_tree = self.this_basis_tree
-
-        if self.other_rev_id is None:
-            other_basis_tree = self.revision_tree(self.other_basis)
-            if other_basis_tree.has_changes(self.other_tree):
-                raise errors.WorkingTreeNotRevision(self.this_tree)
-            other_rev_id = self.other_basis
-            self.other_tree = other_basis_tree
-
-    @deprecated_method(deprecated_in((2, 1, 0)))
-    def file_revisions(self, file_id):
-        self.ensure_revision_trees()
-        if self.this_rev_id is None:
-            if self.this_basis_tree.get_file_sha1(file_id) != \
-                self.this_tree.get_file_sha1(file_id):
-                raise errors.WorkingTreeNotRevision(self.this_tree)
-
-        trees = (self.this_basis_tree, self.other_tree)
-        return [tree.get_file_revision(file_id) for tree in trees]
-
-    @deprecated_method(deprecated_in((2, 1, 0)))
-    def check_basis(self, check_clean, require_commits=True):
-        if self.this_basis is None and require_commits is True:
-            raise errors.BzrCommandError(
-                "This branch has no commits."
-                " (perhaps you would prefer 'bzr pull')")
-        if check_clean:
-            self.compare_basis()
-            if self.this_basis != self.this_rev_id:
-                raise errors.UncommittedChanges(self.this_tree)
-
-    @deprecated_method(deprecated_in((2, 1, 0)))
-    def compare_basis(self):
-        try:
-            basis_tree = self.revision_tree(self.this_tree.last_revision())
-        except errors.NoSuchRevision:
-            basis_tree = self.this_tree.basis_tree()
-        if not self.this_tree.has_changes(basis_tree):
-            self.this_rev_id = self.this_basis
-
     def set_interesting_files(self, file_list):
         self.interesting_files = file_list
 
@@ -1253,26 +1208,6 @@
         # At this point, the lcas disagree, and the tip disagree
         return 'conflict'
 
-    @staticmethod
-    @deprecated_method(deprecated_in((2, 2, 0)))
-    def scalar_three_way(this_tree, base_tree, other_tree, file_id, key):
-        """Do a three-way test on a scalar.
-        Return "this", "other" or "conflict", depending whether a value wins.
-        """
-        key_base = key(base_tree, file_id)
-        key_other = key(other_tree, file_id)
-        #if base == other, either they all agree, or only THIS has changed.
-        if key_base == key_other:
-            return "this"
-        key_this = key(this_tree, file_id)
-        # "Ambiguous clean merge"
-        if key_this == key_other:
-            return "this"
-        elif key_this == key_base:
-            return "other"
-        else:
-            return "conflict"
-
     def merge_names(self, file_id):
         def get_entry(tree):
             if tree.has_id(file_id):

=== modified file 'doc/en/release-notes/bzr-2.5.txt'
--- a/doc/en/release-notes/bzr-2.5.txt	2011-07-15 15:12:52 +0000
+++ b/doc/en/release-notes/bzr-2.5.txt	2011-07-15 15:55:32 +0000
@@ -70,6 +70,11 @@
   remove ``log.show_one_log`` which was never properly deprecated but wasn't
   used and is easy to inline if needed. (Vincent Ladeuil)
 
+* Remove ``Merger.ensure_revision_trees``, ``Merger.file_revisions``,
+  ``Merger.check_basis`` and ``Merger.compare_basis`` deprecated in 2.1.0 as
+  well as ``Merge3Merger.scalar_three_way`` deprecated in 2.2.0.
+  (Vincent Ladeuil)
+
 * 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