Skip to content

cherry-pick from the newest branch#59

Merged
Mariatta merged 2 commits into
python:masterfrom
Mariatta:reverse-sort-branches
Mar 23, 2017
Merged

cherry-pick from the newest branch#59
Mariatta merged 2 commits into
python:masterfrom
Mariatta:reverse-sort-branches

Conversation

@Mariatta

Copy link
Copy Markdown
Member

No description provided.

Comment thread cherry_picker/cherry_picker.py Outdated
raise ValueError("at least one branch is required")

for branch in branches:
for branch in sorted(branches, reverse=True):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will already do the right thing for X.Y branches, but do we want to future-proof it against the day of 3.10 by adding key=lambda v: tuple(map(int, v.split('.')))?

@Mariatta

Copy link
Copy Markdown
Member Author

Thanks :) I updated the code anyway, and added a test for it.

@Mariatta
Mariatta merged commit 92fbad3 into python:master Mar 23, 2017
@Mariatta
Mariatta deleted the reverse-sort-branches branch March 23, 2017 17:31
@brettcannon

Copy link
Copy Markdown
Member

Maybe it's time to set up Travis if there's going to be tests?

@Mariatta

Copy link
Copy Markdown
Member Author

Sounds good :)

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants