support added for postorder tree traversal merge algorithm #8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I added an option to solve #6
There is now a new option (tree_traversal) which can be set to
:breadthfirst --> this is the old behaviour
:postorder --> new option
In the new option the merging happens in the other direction, i.e. it starts at the most super class, in there it merges the derived, and so forth. Files at the same level, get merged from left to right.
It uses deep_merge! instead of deep_merge.
I used the rubytree class to get a very lean implementation. I think the 'classic' behavior can also be done via this method, but I did not dare changing the working code.
I also made a test directory with some test files that I used to test this setup. There is no automation though...