-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move conflicts are not handled #57
Comments
It's not just root conflicts, but move conflicts in general. A root conflict is one thing, but if a node has been moved to two different places, but with the same parent, then it gets a bit tricky. It may be easier to actually flag such cases as conflicts, rather than to allow them. |
Move conflicts can cause successor conflicts without a terminating predecessor conflict, which is really tricky to deal with. |
This was incorrectly closed by #73 |
Root conflicts are actually something of a concern, I've found that they occur in roughly 5% of all file merges in the RxJava library, where both left and right revisions have altered the file. I believe however that I have a solution for allowing root conflicts to pass, i.e. copying the conflicting nodes. It's pretty simple: whenever a root conflict is detected after a merge, remove the conflicting nodes from the SpoonMappings (and any mappings among their children) and restart the merge from the creation of the class representatives map. This will cause these previously moved nodes to not be detected as moves, but as deletions and insertions. It's an imperfect solution, but it's simple and I think it could work. |
Root conflicts are not properly handled and will cause the same node to be inserted in multiple places. This will, quite obviously, mess some stuff up. I think however that it's fine to ignore root conflicts, as there's really no way to visualize them textually.
Anyway, for the PcsInterpreter to work, every
SpoonNode
in the PCS structure must only appear as a predecessor and successor precisely once. This means that if there are root conflicts, the conflicting nodes must be copied such the uniqueness of nodes is preserved.The text was updated successfully, but these errors were encountered: