583
583
:param tt: The TreeTransform where the conflict is resolved.
584
584
:param suffix_to_remove: Either 'THIS' or 'OTHER'
586
The resolution is symmetric, when taking THIS, OTHER is deleted and
586
The resolution is symmetric: when taking THIS, OTHER is deleted and
587
587
item.THIS is renamed into item and vice-versa.
596
596
# never existed or was already deleted (including the case
597
597
# where the user deleted it)
599
# Rename 'item.suffix_to_remove' (note that if
600
# 'item.suffix_to_remove' has been deleted, this is a no-op)
601
this_tid = tt.trans_id_file_id(self.file_id)
602
parent_tid = tt.get_tree_parent(this_tid)
603
tt.adjust_path(osutils.basename(self.path), parent_tid, this_tid)
600
this_path = tt._tree.id2path(self.file_id)
601
except errors.NoSuchId:
602
# The file is not present anymore. This may happen if the user
603
# deleted the file either manually or when resolving a conflict on
604
# the parent. We may raise some exception to indicate that the
605
# conflict doesn't exist anymore and as such doesn't need to be
606
# resolved ? -- vila 20110615
609
this_tid = tt.trans_id_tree_path(this_path)
610
if this_tid is not None:
611
# Rename 'item.suffix_to_remove' (note that if
612
# 'item.suffix_to_remove' has been deleted, this is a no-op)
613
parent_tid = tt.get_tree_parent(this_tid)
614
tt.adjust_path(osutils.basename(self.path), parent_tid, this_tid)
606
617
def action_take_this(self, tree):
607
618
self._resolve_with_cleanups(tree, 'OTHER')