b.m._PlanLCAMerge(_PlanMergeBase) : class documentation

Part of bzrlib.merge View In Hierarchy

This merge algorithm differs from _PlanMerge in that:

  1. comparisons are done against LCAs only
  2. cases where a contested line is new versus one LCA but old versus another are marked as conflicts, by emitting the line as conflicted-a or conflicted-b.

This is faster, and hopefully produces more useful output.

Method __init__ Contructor.
Method _determine_status Determines the status unique lines versus all lcas.

Inherited from _PlanMergeBase:

Method get_lines Get lines for revisions from the backing VersionedFiles.
Method plan_merge Generate a 'plan' for merging the two revisions.
Method _precache_tip_lines Undocumented
Method _iter_plan Undocumented
Method _get_matching_blocks Return a description of which sections of two revisions match.
Method _unique_lines Analyse matching_blocks to determine which lines are unique
Static Method _subtract_plans Remove changes from new_plan that came from old_plan.
def __init__(self, a_rev, b_rev, vf, key_prefix, graph):
Contructor.
Parametersa_revRevision-id of one revision to merge
b_revRevision-id of the other revision to merge
vfA VersionedFiles containing both revisions
key_prefixA prefix for accessing keys in vf, typically (file_id,).
def _determine_status(self, revision_id, unique_line_numbers):
Determines the status unique lines versus all lcas.

Basically, determines why the line is unique to this revision.

A line may be determined new, killed, or both.

If a line is determined new, that means it was not present in at least one LCA, and is not present in the other merge revision.

If a line is determined killed, that means the line was present in at least one LCA.

If a line is killed and new, this indicates that the two merge revisions contain differing conflict resolutions.

Parametersrevision_idThe id of the revision in which the lines are unique
unique_line_numbersThe line numbers of unique lines.
Returnsa tuple of (new_this, killed_other)
API Documentation for Bazaar, generated by pydoctor at 2022-06-16 00:25:16.