Commit learns how to rebase in case of conflict#920
Merged
Conversation
rabernat
approved these changes
Apr 18, 2025
Contributor
rabernat
left a comment
There was a problem hiding this comment.
API looks good! But I would massively increase the number of retries for the default.
I recommend updating docs as part of this PR if possible.
55ddaa4 to
56f7b11
Compare
mpiannucci
approved these changes
Apr 18, 2025
| rebase_tries.unwrap_or(1_000), | ||
| message, | ||
| metadata, | ||
| |_| async {}, |
Collaborator
There was a problem hiding this comment.
Im guessing these are left for future work in python?
Collaborator
Author
There was a problem hiding this comment.
I'm currently using them for Rust tests, if they become useful we can expose them to python.
`Session.commit` accepts new arguments: ``` rebase_with: ConflictSolver | None = None, rebase_tries: int = 5 ``` It uses the `ConflictSolver` to call `Session.rebase` in a loop, up to `rebase_tries` times, and try to commit after each rebase.
56f7b11 to
8c1b7be
Compare
Collaborator
Author
|
Default retries and documentation updated. |
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.
Session.commitaccepts new arguments:It uses the
ConflictSolverto callSession.rebasein a loop, up torebase_triestimes, and try to commit after each rebase.Closes: #919