Skip to content

Commit f73f95c

Browse files
authored
Update backport instructions
Remove the part about merging into master. Remove the part about prefixing the PR title with `X.Y`, cherry_picker.py already does this. Closes #173
1 parent 119320d commit f73f95c

File tree

1 file changed

+11
-31
lines changed

1 file changed

+11
-31
lines changed

committing.rst

Lines changed: 11 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -408,45 +408,25 @@ new features. The other branches only receive bug fixes or security fixes.
408408

409409
.. _branch-merge:
410410

411-
Backporting changes to Python 3.6 (or older version)
412-
----------------------------------------------------
411+
Backporting Changes to Older Version
412+
------------------------------------
413413

414-
The current in-development version of Python is in the ``master`` branch. To properly
415-
port the patch to Python 3.6 (or older version), you should first apply the patch
416-
to master branch::
417-
418-
git checkout master
419-
git apply --reject patch.diff
420-
# Fix any conflicts (e.g. look for *.rej files); compile; run the test suite.
421-
git add -A
422-
git commit -m 'bpo-12345: fix some issue.'
423-
# Note the commit SHA (e.g. git log or git rev-parse --short HEAD).
424-
425-
Then use cherry_picker.py_ to backport the commit.
426-
427-
.. note::
428-
Even when porting an already committed patch, you should *still* check the
429-
test suite runs successfully before committing the patch to another branch.
430-
Subtle differences between two branches sometimes make a patch bogus if
431-
ported without any modifications.
432-
433-
434-
Backport and Cherry-Pick Labels
435-
-------------------------------
436-
437-
Only Core Developers can apply labels to GitHub pull requests. When it is determined
438-
that a pull request needs to be backported into one or more of the maintenance branches,
439-
a core developer can apply the labels ``needs backport to X.Y`` to the pull request.
414+
When it is determined that a pull request needs to be backported into one or more of
415+
the maintenance branches, a core developer can apply the labels ``needs backport to X.Y``
416+
to the pull request.
440417

441418
After the pull request has been merged, it can be backported using cherry_picker.py_.
442419

443-
Prefix the backport pull request with the branch, for example::
420+
The commit hash can be obtained from the original pull request, or by using `git log`
421+
on the ``master`` branch. To display the 10 most recent commit hash and their first
422+
line of the commit message::
444423

445-
[3.6] bpo-12345: Fix the Spam Module
424+
git log -10 --oneline
446425
447426
Apply the label ``cherry-pick or X.Y`` to the backport pull request. Once the backport
448427
pull request has been created, remove the ``needs backport to X.Y`` label from the
449-
original pull request on ``master``.
428+
original pull request on ``master``. Only Core Developers can apply labels to GitHub
429+
pull requests.
450430

451431
.. _cherry_picker.py: https://github.com/python/core-workflow/tree/master/cherry_picker
452432

0 commit comments

Comments
 (0)