Skip to content
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

Unifier class: unify method returns duplicated patches #109

Open
iulianav opened this issue Jun 22, 2018 · 0 comments
Open

Unifier class: unify method returns duplicated patches #109

iulianav opened this issue Jun 22, 2018 · 0 comments

Comments

@iulianav
Copy link

iulianav commented Jun 22, 2018

Unifier class: unify method returns a list containing duplicated patches in the case of conflicts containing equal patches (same path).

e.g.

patch1 = ('remove', '', [('a', 'b')])
patch2 = ('remove', '', [('a', 'b')])
conflicts = Conflict(patch1, patch2)
conflicts.take = 'f' # can be 's' too

The result of calling u.unify([patch1], [patch2], [conflicts]) will be [patch1, patch2] instead of [patch1]. This particular case can lead to KeyErrors in case of calling patch, as it will try to remove the same key twice. The second time it fails as the key has already been deleted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants