Envision
A visual programming IDE for object-oriented languages
|
The DiscardConflictingDeletesComponent detects subtrees which one branch removes entirely and another alters. More...
Public Member Functions | |
virtual void | run (MergeData &mergeData) override |
Public Member Functions inherited from FilePersistence::MergePipelineComponent | |
virtual | ~MergePipelineComponent () |
Private Member Functions | |
void | computeDeletedSubtrees (ChangeGraph &cg, QList< MergeChange * > deletesToLookAt) |
QList< MergeChange * > | deletesConflictingWithMoveOrRelabel (ChangeGraph &cg) |
bool | isAncestorDeleteInList (MergeChange *change, QList< MergeChange * > deletesToLookAt) |
bool | isSubtreeCompletelyDeleted (MergeChange *deleteChange, MergeChange::Branch deletingBranch, ChangeGraph &cg) |
void | removeSuitableDeletes (ChangeGraph &cg, QList< MergeChange * > deletesToLookAt) |
Private Attributes | |
QHash< MergeChange *, MergeChange * > | parentDelete |
QMultiHash< MergeChange *, MergeChange::Branch > | subtreeIsDeleted |
QMultiHash< MergeChange *, MergeChange::Branch > | subtreeIsNotDeleted |
The DiscardConflictingDeletesComponent detects subtrees which one branch removes entirely and another alters.
There are two allowed cases:
In all such cases, the delete operations are discarded and only the others are left. It's important to run this component before any changes have been removed. Otherwise it could happen that some nodes are deleted, and then the parent nodes are moved by the other branch which is unaware of the deletions and results in a tree with holes.
|
private |
|
private |
|
private |
|
private |
|
private |
|
overridevirtual |
Implements FilePersistence::MergePipelineComponent.
|
private |
|
private |
|
private |