-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Update patchcheck upstream remote verification behavior #135806
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
Update patchcheck upstream remote verification behavior #135806
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
|
Running |
|
@ncoghlan Kattni is fine, thank you. |
* find defined "(fetch)" remotes with "python/cpython" in their URL * if there is exactly one, use that remote name * if there is one named "upstream", "origin", or "python", use that remote (in that precedence order) * otherwise report an error listing the defined remotes (cherry picked from commit ac9d37c) Co-authored-by: Kattni <[email protected]>
|
GH-135808 is a backport of this pull request to the 3.14 branch. |
* find defined "(fetch)" remotes with "python/cpython" in their URL * if there is exactly one, use that remote name * if there is one named "upstream", "origin", or "python", use that remote (in that precedence order) * otherwise report an error listing the defined remotes (cherry picked from commit ac9d37c) Co-authored-by: Kattni <[email protected]>
|
GH-135809 is a backport of this pull request to the 3.13 branch. |
…) (#135808) Co-authored-by: Kattni <[email protected]>
…) (#135809) Co-authored-by: Kattni <[email protected]>
* find defined "(fetch)" remotes with "python/cpython" in their URL * if there is exactly one, use that remote name * if there is one named "upstream", "origin", or "python", use that remote (in that precedence order) * otherwise report an error listing the defined remotes
* find defined "(fetch)" remotes with "python/cpython" in their URL * if there is exactly one, use that remote name * if there is one named "upstream", "origin", or "python", use that remote (in that precedence order) * otherwise report an error listing the defined remotes
* find defined "(fetch)" remotes with "python/cpython" in their URL * if there is exactly one, use that remote name * if there is one named "upstream", "origin", or "python", use that remote (in that precedence order) * otherwise report an error listing the defined remotes
Currently, if you run
patchcheckwithout a remote namedupstreamororigin, it fails with the following error:I ran into this during my first contribution, and it required viewing the source code for
patchcheckto figure out what the issue was.To avoid this for others in the future, I have updated the
patchcheckget_git_upstream_remote()method to be more robust. The following changes have been implemented:git remote -v.python/cpythonand(fetch).upstream,origin, andpython, in that order, and returns the first one it finds.Discussed with @ncoghlan prior to submitting this PR.