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

patchcheck checks against branch "master" not "main" #88240

Closed
roryyorke mannequin opened this issue May 8, 2021 · 6 comments
Closed

patchcheck checks against branch "master" not "main" #88240

roryyorke mannequin opened this issue May 8, 2021 · 6 comments
Labels
3.9 only security fixes 3.10 only security fixes 3.11 only security fixes

Comments

@roryyorke
Copy link
Mannequin

roryyorke mannequin commented May 8, 2021

BPO 44074
Nosy @pitrou, @pablogsal, @miss-islington, @roryyorke, @leoll2
PRs
  • bpo-44074: let patchcheck infer the base branch name #25991
  • [3.9] bpo-44074: let patchcheck infer the base branch name (GH-25991) #26022
  • [3.10] bpo-44074: let patchcheck infer the base branch name (GH-25991) #26023
  • bpo-44125: Fix "make patchcheck" on non-English locale #26102
  • [3.10] bpo-44125: Fix "make patchcheck" on non-English locale (GH-26102) #26105
  • [3.9] bpo-44125: Fix "make patchcheck" on non-English locale (GH-26102) #26106
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2021-05-10.18:43:31.352>
    created_at = <Date 2021-05-08.08:05:12.349>
    labels = ['3.9', '3.10', '3.11']
    title = 'patchcheck checks against branch "master" not "main"'
    updated_at = <Date 2021-05-13.18:42:40.210>
    user = 'https://github.com/roryyorke'

    bugs.python.org fields:

    activity = <Date 2021-05-13.18:42:40.210>
    actor = 'miss-islington'
    assignee = 'none'
    closed = True
    closed_date = <Date 2021-05-10.18:43:31.352>
    closer = 'pablogsal'
    components = ['Demos and Tools']
    creation = <Date 2021-05-08.08:05:12.349>
    creator = 'roryyorke'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 44074
    keywords = ['patch']
    message_count = 6.0
    messages = ['393244', '393258', '393427', '393428', '393598', '393601']
    nosy_count = 5.0
    nosy_names = ['pitrou', 'pablogsal', 'miss-islington', 'roryyorke', 'leoll2']
    pr_nums = ['25991', '26022', '26023', '26102', '26105', '26106']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue44074'
    versions = ['Python 3.9', 'Python 3.10', 'Python 3.11']

    @roryyorke
    Copy link
    Mannequin Author

    roryyorke mannequin commented May 8, 2021

    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](https://github.com/python/cpython/blob/main/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?

    @leoll2
    Copy link
    Mannequin

    leoll2 mannequin commented May 8, 2021

    I've just created a patch for this. Now it can automatically detect the default branch name (main, master or whatever)

    @miss-islington
    Copy link
    Contributor

    New changeset 4cc8369 by Miss Islington (bot) in branch '3.10':
    bpo-44074: let patchcheck infer the base branch name (GH-25991)
    4cc8369

    @miss-islington
    Copy link
    Contributor

    New changeset fbd9b99 by Miss Islington (bot) in branch '3.9':
    bpo-44074: let patchcheck infer the base branch name (GH-25991)
    fbd9b99

    @pitrou pitrou added 3.9 only security fixes 3.10 only security fixes 3.11 only security fixes labels May 13, 2021
    @miss-islington
    Copy link
    Contributor

    New changeset 04ce4c7 by Miss Islington (bot) in branch '3.9':
    bpo-44125: Fix "make patchcheck" on non-English locale (GH-26102)
    04ce4c7

    @miss-islington
    Copy link
    Contributor

    New changeset 336dc52 by Miss Islington (bot) in branch '3.10':
    bpo-44125: Fix "make patchcheck" on non-English locale (GH-26102)
    336dc52

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.9 only security fixes 3.10 only security fixes 3.11 only security fixes
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants