Skip to content

Commit 0ac0eca

Browse files
Jelle's review + merge duplicates
1 parent f2dae88 commit 0ac0eca

2 files changed

Lines changed: 9 additions & 40 deletions

File tree

core-team/committing.rst

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -149,44 +149,10 @@ bug fixes or security fixes. In almost all cases the fixes should first
149149
originate on ``main`` and then be ported back to older branches.
150150

151151

152-
.. _branch-merge:
153-
154152
Backporting changes to an older version
155153
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
156154

157-
If it is determined that a pull request needs to be backported into one or
158-
more of the maintenance branches, then a core team member can apply the label
159-
``needs backport to X.Y`` to the pull request.
160-
161-
After the pull request has been merged, miss-islington (bot) will first try to
162-
do the backport automatically. If miss-islington is unable to do it,
163-
then the pull request author or the core team member who merged it should look into
164-
backporting it themselves, using the backport generated by cherry_picker.py_
165-
as a starting point.
166-
167-
You can get the commit hash from the original pull request, or you can use
168-
``git log`` on the ``main`` branch. To display the 10 most recent commit
169-
hashes and their first line of the commit, use the following command::
170-
171-
git log -10 --oneline
172-
173-
.. _backport-pr-title:
174-
175-
You can prefix the backport pull request with the branch, and reference
176-
the pull request number from ``main``. Here is an example::
177-
178-
[3.9] gh-12345: Fix the Spam Module (GH-NNNN)
179-
180-
Here "gh-12345" is the GitHub *issue* number, and "GH-NNNN" is the
181-
number of the original *pull request*.
182-
Note that cherry_picker.py_ adds the branch prefix automatically.
183-
184-
Once the backport pull request has been created, remove the
185-
``needs backport to X.Y`` label from the original pull request. (Only
186-
members of the core team and :ref:`Python Triage Team <triage-team>`
187-
can apply labels to GitHub pull requests).
188-
189-
.. _cherry_picker.py: https://github.com/python/cherry-picker
155+
This section has moved to :ref:`branch-merge`.
190156

191157

192158
Reverting a merged pull request

getting-started/git-boot-camp.rst

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -558,12 +558,15 @@ Note that pushing new changes after the auto-merge flow was enabled
558558
does **NOT** stop it.
559559

560560

561+
.. _branch-merge:
562+
561563
Backporting merged changes
562564
--------------------------
563565

564566
After a pull request has been merged into ``main``, it may need to be backported
565-
to one or more maintenance branches. This is indicated by the
566-
:samp:`needs backport to {X.Y}` labels on the pull request.
567+
to one or more :ref:`maintenance <maintbranch>` or :ref:`security <secbranch>`
568+
branches. This is indicated by the :samp:`needs backport to {X.Y}` labels on
569+
the pull request.
567570

568571
``miss-islington`` will automatically attempt to create backport PRs for the
569572
versions indicated by these labels. If ``miss-islington`` cannot create a
@@ -608,18 +611,18 @@ the following format: Keep the original commit message unchanged, except for
608611
removing the backport pull request number (``(#XXXXX)``). At the end of the
609612
message, append a ``(cherry picked from commit <commit_sha1>)`` line.
610613

611-
Example of good backport commit message:
614+
The format of a correct backport commit message is:
612615

613616
.. code-block:: text
614617
:class: good
615618
616-
gh-XXXXX: <original commit title> (GH-XXXXX)
619+
[<branch>] gh-XXXXX: <original commit title> (GH-XXXXX)
617620
618621
<original commit body>
619622
620623
(cherry picked from commit <commit_sha1>)
621624
622-
Example of bad backport commit message:
625+
An example of a bad backport commit message:
623626

624627
.. code-block:: text
625628
:class: bad

0 commit comments

Comments
 (0)