Rev 5974: Get closer to the exception even if this means ~duplicating tt.trans_id_tree_path to make the code clearer (suggested by jam). in file:///home/vila/src/bzr/bugs/788000-take-other/

Vincent Ladeuil v.ladeuil+lp at free.fr
Wed Jun 15 13:21:46 UTC 2011


At file:///home/vila/src/bzr/bugs/788000-take-other/

------------------------------------------------------------
revno: 5974
revision-id: v.ladeuil+lp at free.fr-20110615132146-52wlrhfezohakpd7
parent: v.ladeuil+lp at free.fr-20110615113605-p7zyyfry9wy1hquc
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 788000-take-other
timestamp: Wed 2011-06-15 15:21:46 +0200
message:
  Get closer to the exception even if this means ~duplicating tt.trans_id_tree_path to make the code clearer (suggested by jam).
-------------- next part --------------
=== modified file 'bzrlib/conflicts.py'
--- a/bzrlib/conflicts.py	2011-06-15 11:36:05 +0000
+++ b/bzrlib/conflicts.py	2011-06-15 13:21:46 +0000
@@ -597,14 +597,16 @@
             # where the user deleted it)
             pass
         try:
-            this_tid = tt.trans_id_tree_file_id(self.file_id)
+            this_path = tt._tree.id2path(self.file_id)
         except errors.NoSuchId:
             # The file is not present anymore. This may happen if the user
             # deleted the file either manually or when resolving a conflict on
             # the parent.  We may raise some exception to indicate that the
             # conflict doesn't exist anymore and as such doesn't need to be
-            # resolved ? -- vila 20110615
+            # resolved ? -- vila 20110615 
             this_tid = None
+        else:
+            this_tid = tt.trans_id_tree_path(this_path)
         if this_tid is not None:
             # Rename 'item.suffix_to_remove' (note that if
             # 'item.suffix_to_remove' has been deleted, this is a no-op)



More information about the bazaar-commits mailing list