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

Fix exit with bad state when backport branch already exists #39

Merged
merged 7 commits into from
Oct 3, 2022

Conversation

Jackenmen
Copy link
Contributor

@Jackenmen Jackenmen commented Aug 7, 2021

Fixes #38
I also went ahead and added a branch_name attribute to BranchCheckoutException which should allow miss-islington (or others using the API) to remove the problematic branch automatically (see python/miss-islington#480). I don't think it would be wise for cherry-picker to do it for you since that potentially risks you losing some work.

@Jackenmen Jackenmen marked this pull request as ready for review August 7, 2021 03:06
@ambv
Copy link
Contributor

ambv commented Aug 7, 2021

Your change is still worth integrating but note that when a backport branch already exists, now cherry-picker will force-push to it (with --force-with-lease so only if there are no other changes on that remote branch):

7122a15

@Jackenmen
Copy link
Contributor Author

Does that mean I should change this to overwrite the existing local branch or should I leave it as it is right now? I went for the more cautious way but I don't really mind changing it if you think it would be better the other way.

@Jackenmen
Copy link
Contributor Author

I resolved the conflict caused by #56. Since I'm already commenting, I just want to gently remind you that I haven't received a response to my question here. I realize it's probably a terrible time for a reminder since it's Christmas, it just so happened that I found about these conflicts while working on something else today 😄

Happy holidays!

cherry_picker/cherry_picker.py Outdated Show resolved Hide resolved
cherry_picker/cherry_picker.py Outdated Show resolved Hide resolved
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
@Mariatta Mariatta merged commit 7e333ac into python:main Oct 3, 2022
@Mariatta
Copy link
Member

Mariatta commented Oct 3, 2022

Thanks for the work.

@Jackenmen Jackenmen deleted the issue/38 branch October 4, 2022 06:42
Jackenmen added a commit to Jackenmen/cherry-picker that referenced this pull request Oct 4, 2022
@Jackenmen Jackenmen mentioned this pull request Oct 4, 2022
@Mariatta Mariatta added the hacktoberfest-accepted Accepted for hacktoberfest label Oct 4, 2022
Mariatta pushed a commit that referenced this pull request Oct 4, 2022
* Fix the test for already existing branch

Introduced in #39

* Fix the test for backport pause and continue

Introduced in #43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA signed hacktoberfest-accepted Accepted for hacktoberfest
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cherry-picker ends up in bad state if a backport-... branch already exists
5 participants