Skip to content

(don't merge) Add --abort/--continue option to cherry_picker.py #65

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

Closed
wants to merge 2 commits into from

Conversation

Mariatta
Copy link
Member

@Mariatta Mariatta commented Mar 25, 2017

--abort
Do git cherry-pick --abort
Clean up branch

--continue
Do git commit -am "resolved" --allow-empty
Clean up branch

demo: https://asciinema.org/a/dfalzy45oq8b3c6dvakwfs6la

Closes #45

@serhiy-storchaka
Copy link
Member

I meant something different. I want the behavior similar to git cherry-pick --continue/--abort. python -m cherry_picker --continue should continue the work after the failure of previous run of cherry_picker. For example after manually fixing the conflicts it should push the branch and open a PR. python -m cherry_picker --abort should reset unfinished cherry-picking (run git cherry-pick --abort, remove the branch, etc).

@Mariatta
Copy link
Member Author

Ok I think this is what you wanted:

  1. run python -m cherry_picker <hash> <branch> <branch>
  2. if it failed in <branch 1>, stop.

From here user has 2 options:

option 1:

  1. manually fix it
  2. run python -m cherry_picker --continue
  3. cherry_picker.py will push and open the PR
  4. cherry_picker.py will clean up the branch

option 2:

  1. run python -m cherry_picker --abort
  2. this will run git cherry-pick --abort
  3. cherry_picker.py will clean up the branch

🤔 Sounds right?

@serhiy-storchaka
Copy link
Member

Yes, it is what I meant. Thank you for explaining it.

@Mariatta Mariatta changed the title Add --abort/--continue option to cherry_picker.py [wip] Add --abort/--continue option to cherry_picker.py Mar 28, 2017
--abort:
Do `git cherry-pick --abort`
Clean up branch

--continue
Do `git commit -am "resolved" --allow-empty`
Clean up branch

Closes python#45
@Mariatta Mariatta force-pushed the abort_continue_options branch from 2b1cab0 to fd1fbac Compare March 31, 2017 03:47
@Mariatta Mariatta changed the title [wip] Add --abort/--continue option to cherry_picker.py Add --abort/--continue option to cherry_picker.py Mar 31, 2017
@Mariatta
Copy link
Member Author

@serhiy-storchaka I implemented the behavior as discussed above.
Demo https://asciinema.org/a/dfalzy45oq8b3c6dvakwfs6la

@Mariatta Mariatta changed the title Add --abort/--continue option to cherry_picker.py (don't merge) Add --abort/--continue option to cherry_picker.py Apr 3, 2017
@ncoghlan
Copy link
Contributor

@Mariatta Given #68, should this be closed now?

@Mariatta Mariatta closed this Apr 11, 2017
@Mariatta Mariatta deleted the abort_continue_options branch April 11, 2017 16:33
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.

Consider how to handle failed cherry-picks
4 participants