1081
@deprecated_method(deprecated_in((2, 4, 0)))
1083
if self.tt.final_kind(self.tt.root) is None:
1084
self.tt.cancel_deletion(self.tt.root)
1085
if self.tt.final_file_id(self.tt.root) is None:
1086
self.tt.version_file(self.tt.tree_file_id(self.tt.root),
1088
other_root_file_id = self.other_tree.get_root_id()
1089
if other_root_file_id is None:
1091
other_root = self.tt.trans_id_file_id(other_root_file_id)
1092
if other_root == self.tt.root:
1094
if self.this_tree.has_id(
1095
self.other_tree.get_root_id()):
1096
# the other tree's root is a non-root in the current tree (as
1097
# when a previously unrelated branch is merged into another)
1099
if self.tt.final_kind(other_root) is not None:
1100
other_root_is_present = True
1102
# other_root doesn't have a physical representation. We still need
1103
# to move any references to the actual root of the tree.
1104
other_root_is_present = False
1105
# 'other_tree.inventory.root' is not present in this tree. We are
1106
# calling adjust_path for children which *want* to be present with a
1107
# correct place to go.
1108
for child_id in self.other_tree.iter_children(self.other_tree.get_root_id()):
1109
trans_id = self.tt.trans_id_file_id(child_id)
1110
if not other_root_is_present:
1111
if self.tt.final_kind(trans_id) is not None:
1112
# The item exist in the final tree and has a defined place
1115
# Move the item into the root
1117
final_name = self.tt.final_name(trans_id)
1118
except errors.NoFinalPath:
1119
# This file is not present anymore, ignore it.
1121
self.tt.adjust_path(final_name, self.tt.root, trans_id)
1122
if other_root_is_present:
1123
self.tt.cancel_creation(other_root)
1124
self.tt.cancel_versioning(other_root)
1126
1081
def write_modified(self, results):
1127
1082
modified_hashes = {}
1128
1083
for path in results.modified_paths:
1238
1193
# At this point, the lcas disagree, and the tip disagree
1239
1194
return 'conflict'
1242
@deprecated_method(deprecated_in((2, 2, 0)))
1243
def scalar_three_way(this_tree, base_tree, other_tree, file_id, key):
1244
"""Do a three-way test on a scalar.
1245
Return "this", "other" or "conflict", depending whether a value wins.
1247
key_base = key(base_tree, file_id)
1248
key_other = key(other_tree, file_id)
1249
#if base == other, either they all agree, or only THIS has changed.
1250
if key_base == key_other:
1252
key_this = key(this_tree, file_id)
1253
# "Ambiguous clean merge"
1254
if key_this == key_other:
1256
elif key_this == key_base:
1261
1196
def merge_names(self, file_id):
1262
1197
def get_entry(tree):