classification
Title: patchcheck checks against branch "master" not "main"
Type: Stage: resolved
Components: Demos and Tools Versions: Python 3.11, Python 3.10, Python 3.9
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: leoll2, miss-islington, pablogsal, pitrou, roryyorke
Priority: normal Keywords: patch

Created on 2021-05-08 08:05 by roryyorke, last changed 2021-05-13 18:42 by miss-islington. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 25991 merged leoll2, 2021-05-08 13:43
PR 26022 merged miss-islington, 2021-05-10 18:34
PR 26023 merged miss-islington, 2021-05-10 18:34
PR 26102 merged pitrou, 2021-05-13 17:24
PR 26105 merged miss-islington, 2021-05-13 17:48
PR 26106 merged miss-islington, 2021-05-13 17:48
Messages (6)
msg393244 - (view) Author: Rory Yorke (roryyorke) * Date: 2021-05-08 08:05
I'm probably missing something, but "master" seems hard-coded into patchcheck.py, and I couldn't find any related issues on bpo.

Checked on branch off 42fcad2.

When I ran patchcheck:

    rory@rory-latitude:~/src/cpython$ ./python Tools/scripts/patchcheck.py
    Getting base branch for PR ... origin/master
    Getting the list of files that have been added/changed ... fatal: ambiguous argument 'origin/master': unknown revision or path not in the working tree.
    Use '--' to separate paths from revisions, like this:
    'git <command> [<revision>...] -- [<file>...]'
    0 files
    <snip>

The obvious offender is line 81 of Tools/scripts/patchcheck.py:

        base_branch = "master"

Changing this to "main" results in useful output, but I imagine one
would want to check for both "master" and "main" for a while yet?
msg393258 - (view) Author: Leonardo Lai (leoll2) * Date: 2021-05-08 13:49
I've just created a patch for this. Now it can automatically detect the default branch name (`main`, `master` or whatever)
msg393427 - (view) Author: miss-islington (miss-islington) Date: 2021-05-10 18:58
New changeset 4cc836983ecc643be776026049bd1bcc826c7a0e by Miss Islington (bot) in branch '3.10':
bpo-44074: let patchcheck infer the base branch name (GH-25991)
https://github.com/python/cpython/commit/4cc836983ecc643be776026049bd1bcc826c7a0e
msg393428 - (view) Author: miss-islington (miss-islington) Date: 2021-05-10 18:58
New changeset fbd9b9939cffda4936a986bc729833c69b61f4cb by Miss Islington (bot) in branch '3.9':
bpo-44074: let patchcheck infer the base branch name (GH-25991)
https://github.com/python/cpython/commit/fbd9b9939cffda4936a986bc729833c69b61f4cb
msg393598 - (view) Author: miss-islington (miss-islington) Date: 2021-05-13 18:14
New changeset 04ce4c773667b0d9d05a89aea4720f8cf84e834e by Miss Islington (bot) in branch '3.9':
bpo-44125: Fix "make patchcheck" on non-English locale (GH-26102)
https://github.com/python/cpython/commit/04ce4c773667b0d9d05a89aea4720f8cf84e834e
msg393601 - (view) Author: miss-islington (miss-islington) Date: 2021-05-13 18:42
New changeset 336dc523a4180f99955b0fdb65e86059a1abac32 by Miss Islington (bot) in branch '3.10':
bpo-44125: Fix "make patchcheck" on non-English locale (GH-26102)
https://github.com/python/cpython/commit/336dc523a4180f99955b0fdb65e86059a1abac32
History
Date User Action Args
2021-05-13 18:42:40miss-islingtonsetmessages: + msg393601
2021-05-13 18:14:30miss-islingtonsetmessages: + msg393598
2021-05-13 17:48:35miss-islingtonsetpull_requests: + pull_request24750
2021-05-13 17:48:29miss-islingtonsetpull_requests: + pull_request24748
2021-05-13 17:24:48pitrousetnosy: + pitrou

pull_requests: + pull_request24744
2021-05-13 17:21:23pitrousetversions: + Python 3.9, Python 3.10, Python 3.11
2021-05-10 18:58:49miss-islingtonsetmessages: + msg393428
2021-05-10 18:58:47miss-islingtonsetmessages: + msg393427
2021-05-10 18:43:31pablogsalsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2021-05-10 18:34:49miss-islingtonsetpull_requests: + pull_request24673
2021-05-10 18:34:45miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request24672
2021-05-08 21:25:03ned.deilysetnosy: + pablogsal
2021-05-08 13:49:58leoll2setmessages: + msg393258
2021-05-08 13:43:21leoll2setkeywords: + patch
nosy: + leoll2

pull_requests: + pull_request24644
stage: patch review
2021-05-08 08:05:12roryyorkecreate