Skip to content

Consider how to handle failed cherry-picks #45

Closed

Description

@Mariatta

From @ncoghlan on March 12, 2017 4:57

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:

Complain and exit early if the checkout is in a messy state, and suggesting running git stash to move the local changes aside.
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?

Copied from original issue: Mariatta/chic_a_cherry_picker#15

Activity

  1. ncoghlan commented on Mar 20, 2017

    @ncoghlan
    Contributor

    #51 points out that for the interactive use case, it's likely to be helpful to drop the user into the failed cherry-pick directory with a printed command on:

    • how to finish the current cherry-pick
    • how to resume any other not-yet-attempted cherry-picks
  2. serhiy-storchaka commented on Mar 22, 2017

    @serhiy-storchaka
    Member

    Would be nice if cherry_picker.py be allowing to fix errors manually and continue its work when run with --continue. Running with --abort should abort the current conflict resolution process, reset the workspace and delete just created branch.

  3. Mariatta commented on Mar 22, 2017

    @Mariatta
    MemberAuthor

    Thanks @serhiy-storchaka . I started working on handling errors in cherry_picker.py see #57
    I implemented the interactive mode where it will ask the user of how to proceed.
    But if we want it as --continue or --abort options, it can be done.

  4. self-assigned this
    on Mar 22, 2017
  5. ncoghlan commented on Mar 23, 2017

    @ncoghlan
    Contributor

    The --continue/--abort approach would align nicely with the way git's own commands work, so +1 from me for that approach.

  6. added a commit that references this issue on Mar 31, 2017
  7. Mariatta commented on Mar 31, 2017

    @Mariatta
    MemberAuthor

    Please check if #65 does what's expected. Thanks :)

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

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions