Skip to content

wip: Handle error when cherry-picking#57

Closed
Mariatta wants to merge 1 commit into
python:masterfrom
Mariatta:err_handling
Closed

wip: Handle error when cherry-picking#57
Mariatta wants to merge 1 commit into
python:masterfrom
Mariatta:err_handling

Conversation

@Mariatta

Copy link
Copy Markdown
Member

Attempt at handling errors while cherry-picking.

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

When an error occurs, present two options to user:

  1. Stop cherry-picking, and continue manually
  2. Skip the current branch, and try to cherry-pick the next branch

When 1 is selected, provide hints on how to continue

When 2 is selected, abort the cherry-pick and continue with the next branch

When an error occurs, present two options to user:
1. Stop cherry-picking, and continue manually
2. Skip the current branch, and try to cherry-pick the next branch

When 1 is selected, provide hints on how to continue

When 2 is selected, abort the cherry-pick and continue with the next branch
@Mariatta

Copy link
Copy Markdown
Member Author

This PR attempts to address some of the comments in #51 and #45

In case there's an error in cherry-picking, it will enter an interactive mode, where user can decide whether they want to quit, or to continue with backport of the next branch.

Please see the demo of how this works at https://asciinema.org/a/108298
Looking for feedback about this approach.

Thanks :)

@brettcannon

Copy link
Copy Markdown
Member

I've only watched the video, but one tweak I would suggest making is when you say "aborting ..." I would name what Python version you're aborting for (e.g. "aborting for 2.7 ..." or something), otherwise I initially thought the whole process was aborting.

@serhiy-storchaka

Copy link
Copy Markdown
Member

I think the script always should stop cherry-picking and save the current state in local or global file if it can't be derived from the state of git. It is very unlikely that cherry-picking to 3.5 can be successful after failing cherry-picking to 3.6. The script should be able to skip already passed steps when run with the --continue option.

@brettcannon

Copy link
Copy Markdown
Member

So I guess that would require sorting the branches to make sure it goes from newest to oldest to make sure your failures fall as late as possible?

@Mariatta

Copy link
Copy Markdown
Member Author

I made #59 so it will now cherry-pick from the newest branch.

@Mariatta

Copy link
Copy Markdown
Member Author

Closing. Please see #65 instead.

@Mariatta Mariatta closed this Mar 31, 2017
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