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

Add the branch number to cherry pick commits? #44

Closed
Mariatta opened this issue Mar 16, 2017 · 4 comments · Fixed by #68
Closed

Add the branch number to cherry pick commits? #44

Mariatta opened this issue Mar 16, 2017 · 4 comments · Fixed by #68
Assignees

Comments

@Mariatta
Copy link
Member

From @ncoghlan on March 12, 2017 4:46

I like having the '[X.Y]' prefixes in cherry pick commit messages, so I went exploring to figure out how we could add them automatically here.

As far as I can tell, the best available option seems to be a combination of git commit --amend -m and http://stackoverflow.com/questions/7293008/how-to-read-last-commit-comment which would involve doing:

git log -1 --pretty=%B

to get the full text of the current commit message, prepending the appropriate "[X.Y] " header, and then writing it back into the cherry-pick commit with git commit --amend -m.

Is that a change you might be interested in including if I put together a PR?

Copied from original issue: Mariatta/chic_a_cherry_picker#14

@Mariatta
Copy link
Member Author

From @ncoghlan on March 12, 2017 9:44

The other interesting question here is whether or not to leave the original PR number in the commit summary (if it's present). If we do, it has the nice property of automatically mentioning the backport PR on the original PR page.

@Mariatta
Copy link
Member Author

Perhaps this can be discussed in the core-workflow repo :) (Once I figured out how to move the script there)

@Mariatta
Copy link
Member Author

So I imported the script to core-workflow (not sure if I did it correctly or not..)

Please re-create these issues there :)
Thanks.

@Mariatta
Copy link
Member Author

Mariatta commented Apr 3, 2017

Addressed in #68

@Mariatta Mariatta self-assigned this Apr 3, 2017
Mariatta added a commit that referenced this issue Apr 15, 2017
…H-68)

* Added--abort and --continue options
* Added --status option, it will do git status in the CPython dir
* Automatically prefix the commit title with [X.Y]
* Automatically replace #<PR-ID> with GH-<PR-ID>
* Wrote some more tests

Closes #44
Closes #45
Mariatta added a commit to python/cherry-picker that referenced this issue May 30, 2019
…H-68)

* Added--abort and --continue options
* Added --status option, it will do git status in the CPython dir
* Automatically prefix the commit title with [X.Y]
* Automatically replace #<PR-ID> with GH-<PR-ID>
* Wrote some more tests

Closes python/core-workflow#44
Closes python/core-workflow#45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant