Repository navigation
Show how to restore the backport branch after deleting it - #196
Open
muhammad-a-dev wants to merge 1 commit into
Open
muhammad-a-dev wants to merge 1 commit into
muhammad-a-dev wants to merge 1 commit into
Conversation
Member
|
IMO, this seems like a workaround for a problem we should fix instead. Skipping deletion when the push state is failed or letting the push failure propagate so the existing paused path handles it seem clearer to me. |
Member
|
I wrote #197. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #78.
When cherry_picker deletes the backport branch (for example after a push that failed, as in the report in #78), any manual conflict resolution on that branch looks lost unless you know how to dig it out of
git reflog.This follows the suggestion in #78 (comment):
cleanup_branch()now records the branch's commit before deleting it, and after a successful delete prints how to get it back:If the commit can't be resolved, or the delete fails, nothing extra is printed. Nothing else changes about when the branch is deleted.
Tests: extended
test_cleanup_branchto check the hint and the exact SHA, andtest_cleanup_branch_failto check no hint is printed when the delete fails.pytest(99 passed) andpre-commit run --all-filespass locally.This change was prepared with the help of an AI assistant.