From c819239f3eae2ade70a23829053b266768e45cc0 Mon Sep 17 00:00:00 2001 From: Mariatta Wijaya Date: Sun, 18 Jun 2017 20:43:52 -0700 Subject: [PATCH 1/3] Update readme with installation instruction using pip. Consistently use double backticks. --- cherry_picker/readme.rst | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/cherry_picker/readme.rst b/cherry_picker/readme.rst index 39e2792..fc86591 100644 --- a/cherry_picker/readme.rst +++ b/cherry_picker/readme.rst @@ -17,8 +17,6 @@ maintenance branches (``3.6``, ``3.5``, ``2.7``). It will prefix the commit message with the branch, e.g. ``[3.6]``, and then opens up the pull request page. -This script will become obsolete once the cherry-picking bot is implemented. - Tests are to be written using pytest. @@ -29,24 +27,21 @@ Requires Python 3.6. :: - $ git clone https://github.com/python/core-workflow.git - $ cd core-workflow $ python3 -m venv venv $ source venv/bin/activate - (venv) $ python -m pip install wheel - (venv) $ python -m pip install --upgrade . + (venv) $ python -m pip install cherry_picker -Specify an `upstream` remote in the cloned CPython repository:: +Ensure that an ``upstream`` remote is specified in the cloned CPython repository:: $ git remote add upstream https://github.com/python/cpython.git -The cherry picking script assumes that if an `upstream` remote is defined, then +The cherry picking script assumes that if an ``upstream`` remote is defined, then it should be used as the source of upstream changes and as the base for -cherry-pick branches. Otherwise, `origin` is used for that purpose. +cherry-pick branches. Otherwise, ``origin`` is used for that purpose. By default, the PR branches used to submit pull requests back to the main -repository are pushed to `origin`. If this is incorrect, then the correct +repository are pushed to ``origin``. If this is incorrect, then the correct remote will need be specified using the ``--pr-remote`` option (e.g. ``--pr-remote pr`` to use a remote named ``pr``). @@ -95,7 +90,9 @@ Additional options:: Demo ---- -https://asciinema.org/a/122815 +- How to install: https://asciinema.org/a/125254 + +- How to backport: https://asciinema.org/a/125256 Example @@ -175,7 +172,7 @@ This will generate pull requests through a remote other than ``origin`` `--status` option ----------------- -This will do `git status` for the CPython directory. +This will do ``git status`` for the CPython directory. `--abort` option ---------------- @@ -185,8 +182,8 @@ Cancels the current cherry-pick and cleans up the cherry-pick branch. `--continue` option ------------------- -Continues the current cherry-pick, commits, pushes the current branch to origin, -opens the PR page, and cleans up the branch. +Continues the current cherry-pick, commits, pushes the current branch to +``origin``, opens the PR page, and cleans up the branch. `--no-push` option ------------------ From fa806139a34356a0539c0091c29e5071e418648f Mon Sep 17 00:00:00 2001 From: Mariatta Wijaya Date: Sun, 18 Jun 2017 20:45:52 -0700 Subject: [PATCH 2/3] Not using "how to" in demo section. --- cherry_picker/readme.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cherry_picker/readme.rst b/cherry_picker/readme.rst index fc86591..5efe1c8 100644 --- a/cherry_picker/readme.rst +++ b/cherry_picker/readme.rst @@ -90,9 +90,9 @@ Additional options:: Demo ---- -- How to install: https://asciinema.org/a/125254 +- Installation: https://asciinema.org/a/125254 -- How to backport: https://asciinema.org/a/125256 +- Backport: https://asciinema.org/a/125256 Example From e972a6d2461680a7d918fbd27c9fddb7ff754a72 Mon Sep 17 00:00:00 2001 From: Mariatta Wijaya Date: Sun, 18 Jun 2017 22:26:46 -0700 Subject: [PATCH 3/3] Split verifying and setting up upstream remote --- cherry_picker/readme.rst | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/cherry_picker/readme.rst b/cherry_picker/readme.rst index 5efe1c8..a6778df 100644 --- a/cherry_picker/readme.rst +++ b/cherry_picker/readme.rst @@ -31,15 +31,22 @@ Requires Python 3.6. $ source venv/bin/activate (venv) $ python -m pip install cherry_picker -Ensure that an ``upstream`` remote is specified in the cloned CPython repository:: - - $ git remote add upstream https://github.com/python/cpython.git - - The cherry picking script assumes that if an ``upstream`` remote is defined, then it should be used as the source of upstream changes and as the base for cherry-pick branches. Otherwise, ``origin`` is used for that purpose. +Verify that an ``upstream`` remote is set to the CPython repository:: + + $ git remote -v + ... + upstream https://github.com/python/cpython (fetch) + upstream https://github.com/python/cpython (push) + +If needed, create the ``upstream`` remote:: + + $ git remote add upstream https://github.com/python/cpython.git + + By default, the PR branches used to submit pull requests back to the main repository are pushed to ``origin``. If this is incorrect, then the correct remote will need be specified using the ``--pr-remote`` option (e.g.