92
92
"""Attempt to merge the contents of a single file.
94
94
:param merge_params: A bzrlib.merge.MergeHookParams
95
:return : A tuple of (status, chunks), where status is one of
95
:return: A tuple of (status, chunks), where status is one of
96
96
'not_applicable', 'success', 'conflicted', or 'delete'. If status
97
97
is 'success' or 'conflicted', then chunks should be an iterable of
98
98
strings for the new file contents.
888
888
self.tt.iter_changes(), self.change_reporter)
889
889
self.cook_conflicts(fs_conflicts)
890
890
for conflict in self.cooked_conflicts:
891
trace.warning(conflict)
891
trace.warning(unicode(conflict))
893
893
def _entries3(self):
894
894
"""Gather data about files modified between three trees.
933
933
it then compares with THIS and BASE.
935
935
For the multi-valued entries, the format will be (BASE, [lca1, lca2])
936
:return: [(file_id, changed, parents, names, executable)]
937
file_id Simple file_id of the entry
938
changed Boolean, True if the kind or contents changed
940
parents ((base, [parent_id, in, lcas]), parent_id_other,
942
names ((base, [name, in, lcas]), name_in_other, name_in_this)
943
executable ((base, [exec, in, lcas]), exec_in_other, exec_in_this)
937
:return: [(file_id, changed, parents, names, executable)], where:
939
* file_id: Simple file_id of the entry
940
* changed: Boolean, True if the kind or contents changed else False
941
* parents: ((base, [parent_id, in, lcas]), parent_id_other,
943
* names: ((base, [name, in, lcas]), name_in_other, name_in_this)
944
* executable: ((base, [exec, in, lcas]), exec_in_other,
945
947
if self.interesting_files is not None:
946
948
lookup_trees = [self.this_tree, self.base_tree]
2401
2403
class _PlanLCAMerge(_PlanMergeBase):
2403
2405
This merge algorithm differs from _PlanMerge in that:
2404
2407
1. comparisons are done against LCAs only
2405
2408
2. cases where a contested line is new versus one LCA but old versus
2406
2409
another are marked as conflicts, by emitting the line as conflicted-a
2448
2451
If a line is killed and new, this indicates that the two merge
2449
2452
revisions contain differing conflict resolutions.
2450
2454
:param revision_id: The id of the revision in which the lines are
2452
2456
:param unique_line_numbers: The line numbers of unique lines.
2453
:return a tuple of (new_this, killed_other):
2457
:return: a tuple of (new_this, killed_other)