Skip to content

cherry_picker hardcodes the name of the python/cpython.git repo #19

Closed

Description

@markshannon

cherry_picker needs an option to specify the git remote name for the CPython repo.
Currently it is hardcoded to "upstream" or "origin", and can't be used if a meaningful name like "python" is used
E.g.

~/repos/cpython$ git remote -v
python	git@github.com:python/cpython.git (fetch)
python	git@github.com:python/cpython.git (push)
mine	git@github.com:markshannon/cpython.git (fetch)
mine	git@github.com:markshannon/cpython.git (push)

Activity

  1. Mariatta commented on Sep 25, 2020

    @Mariatta
    Member

    Perhaps we can add yet another option to specify the upstream.
    Right now it only recognizes either upstream or origin.

    def upstream(self):
    """Get the remote name to use for upstream branches
    Uses "upstream" if it exists, "origin" otherwise
    """
    cmd = ["git", "remote", "get-url", "upstream"]
    try:
    subprocess.check_output(cmd, stderr=subprocess.DEVNULL)
    except subprocess.CalledProcessError:
    return "origin"
    return "upstream"

    PR is welcome.

  2. moved this to Todo in Sprinton Oct 3, 2022
  3. moved this from Todo to Done in Sprinton Oct 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions