patchwork: fix subject name to branch name mapping #21
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.
Subject.branch() returns a branch name constructed from a series id.
Fix a bug in this functions: pick the id of the last (the newest)
relevant_series() and not the first one (the oldest).
This bug was dormant most of the time, because usually there is only
one relevant series for a given subject name. However when there are
more, we got a mismatch between what patches were picked up (the
newest, correctly) and to what series branch they were applied (the
oldest, incorrectly). This caused various issues, for example
NewPRWithNoChangeException on attempt to apply the patches.
Add an integration test with a real example of a series creating this
issue. Fix other tests, that were expecting incorrect behavior.