Rev 4638: Workaround bug #533547. in file:///home/vila/src/bzr/bugs/531967-unify-name-conflicts/

Vincent Ladeuil v.ladeuil+lp at free.fr
Wed Mar 10 10:06:46 GMT 2010


At file:///home/vila/src/bzr/bugs/531967-unify-name-conflicts/

------------------------------------------------------------
revno: 4638
revision-id: v.ladeuil+lp at free.fr-20100310100646-cxdu0h3y6pokm5je
parent: v.ladeuil+lp at free.fr-20100310094436-b21be33p3nro45u0
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 531967-unify-name-conflicts
timestamp: Wed 2010-03-10 11:06:46 +0100
message:
  Workaround bug #533547.
  
  * bzrlib/conflicts.py:
  (PathConflict._resolve, PathConflict._get_or_infer_file_id,
  PathConflict._revision_tree): Workaround bug #533547 by getting
  revision trees directly from the repo.
-------------- next part --------------
=== modified file 'bzrlib/conflicts.py'
--- a/bzrlib/conflicts.py	2010-03-10 09:44:36 +0000
+++ b/bzrlib/conflicts.py	2010-03-10 10:06:46 +0000
@@ -494,7 +494,7 @@
             tid = tt.trans_id_tree_path(path_to_create)
             transform.create_from_tree(
                 tt, tt.trans_id_tree_path(path_to_create),
-                tt._tree.revision_tree(revid), file_id)
+                self._revision_tree(tt._tree, revid), file_id)
             tt.version_file(file_id, tid)
 
         # Adjust the path for the retained file id
@@ -503,6 +503,9 @@
         tt.adjust_path(path, parent_tid, tid)
         tt.apply()
 
+    def _revision_tree(self, tree, revid):
+        return tree.branch.repository.revision_tree(revid)
+
     def _get_or_infer_file_id(self, tree):
         # FIXME: Needs cleanup
         if self.file_id is not None:
@@ -524,7 +527,7 @@
         # Search the file-id in the parents with any path available
         file_id = None
         for revid in tree.get_parent_ids():
-            revtree = tree.revision_tree(revid)
+            revtree = self._revision_tree(tree, revid)
             for p in possible_paths:
                 file_id = revtree.path2id(p)
                 if file_id is not None:



More information about the bazaar-commits mailing list