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
# the other tree 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(
1109
self.other_tree.get_root_id()):
1110
trans_id = self.tt.trans_id_file_id(child_id)
1111
if not other_root_is_present:
1112
if self.tt.final_kind(trans_id) is not None:
1113
# The item exist in the final tree and has a defined place
1116
# Move the item into the root
1118
final_name = self.tt.final_name(trans_id)
1119
except errors.NoFinalPath:
1120
# This file is not present anymore, ignore it.
1122
self.tt.adjust_path(final_name, self.tt.root, trans_id)
1123
if other_root_is_present:
1124
self.tt.cancel_creation(other_root)
1125
self.tt.cancel_versioning(other_root)
1127
1081
def write_modified(self, results):
1128
1082
modified_hashes = {}
1129
1083
for path in results.modified_paths:
1239
1193
# At this point, the lcas disagree, and the tip disagree
1240
1194
return 'conflict'
1243
@deprecated_method(deprecated_in((2, 2, 0)))
1244
def scalar_three_way(this_tree, base_tree, other_tree, file_id, key):
1245
"""Do a three-way test on a scalar.
1246
Return "this", "other" or "conflict", depending whether a value wins.
1248
key_base = key(base_tree, file_id)
1249
key_other = key(other_tree, file_id)
1250
#if base == other, either they all agree, or only THIS has changed.
1251
if key_base == key_other:
1253
key_this = key(this_tree, file_id)
1254
# "Ambiguous clean merge"
1255
if key_this == key_other:
1257
elif key_this == key_base:
1262
1196
def merge_names(self, file_id):
1263
1197
def get_entry(tree):