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

Consider how to handle failed cherry-picks #15

Closed
ncoghlan opened this issue Mar 12, 2017 · 2 comments
Closed

Consider how to handle failed cherry-picks #15

ncoghlan opened this issue Mar 12, 2017 · 2 comments

Comments

@ncoghlan
Copy link
Contributor

I think this utility has a lot of potential to evolve into the bot that actually does the automated cherry-pick PR creation, and one of the things we'll need to address there is what to do when the routine cherry pick fails.

At the moment, if the first cherry-pick fails, it leaves the checkout in a messy state, so all the subsequent branch creation commands fail.

I'm thinking one way of tackling this would be to:

  1. Complain and exit early if the checkout is in a messy state, and suggesting running git stash to move the local changes aside.
  2. If any of the cherry-picks fail do an immediate git reset --hard and move on to the next branch.

Does that approach sound reasonable?

@Mariatta
Copy link
Owner

Thanks for using (and improving) this script :)
I don't yet know how to write a bot.. :( I'll need some more guidance for it.
It also sounds like Berker and/or Maciej are already working on the bot, I don't really want to step on their toes.

Sounds reasonable. In some situations where the merge failed, I've been able to do git cherry-pick --abort.

@Mariatta
Copy link
Owner

This issue was moved to python/core-workflow#45

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

No branches or pull requests

2 participants