Part of bzrlib.merge View In Hierarchy
Method | __init__ | Contructor. |
Method | plan_merge | Generate a 'plan' for merging the two revisions. |
Method | _precache_tip_lines | Undocumented |
Method | _find_recursive_lcas | Find all the ancestors back to a unique lca |
Method | _find_unique_parents | Find ancestors of tip that aren't ancestors of base. |
Static Method | _remove_external_references | Remove references that go outside of the parent map. |
Static Method | _prune_tails | Remove tails from the parent map. |
Method | _get_interesting_texts | Return a dict of texts we are interested in. |
Method | _build_weave | Undocumented |
Inherited from _PlanMergeBase:
Method | get_lines | Get lines for revisions from the backing VersionedFiles. |
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. |
Parameters | a_rev | Revision-id of one revision to merge |
b_rev | Revision-id of the other revision to merge | |
vf | A VersionedFiles containing both revisions | |
key_prefix | A prefix for accessing keys in vf, typically (file_id,). |
Parameters | tip_keys | Nodes that are interesting |
base_key | Cull all ancestors of this node | |
Returns | The parent map for all revisions between tip_keys and base_key. base_key will be included. References to nodes outside of the ancestor set will also be removed. |
Parameters | parent_map | Something returned from Graph.get_parent_map(keys) |
Returns | (filtered_parent_map, child_map, tails) filtered_parent_map is parent_map without external references child_map is the {parent_key: [child_keys]} mapping tails is a list of nodes that do not have any parents in the map |
This will remove the supplied revisions until no more children have 0 parents.
Parameters | parent_map | A dict of {child: [parents]}, this dictionary will be modified in place. |
tails_to_remove | A list of tips that should be removed, this list will be consumed | |
child_map | The reverse dict of parent_map ({parent: [children]}) this dict will be modified | |
Returns | None, parent_map will be modified in place. |
Note that the input is in key tuples, but the output is in plain revision ids.
Parameters | parent_map | The output from _find_recursive_lcas |
Returns | A dict of {'revision_id':lines} as returned by _PlanMergeBase.get_lines() |
This involves comparing their texts and determining the cause of differences. If text A has a line and text B does not, then either the line was added to text A, or it was deleted from B. Once the causes are combined, they are written out in the format described in VersionedFile.plan_merge