@@ -408,45 +408,25 @@ new features. The other branches only receive bug fixes or security fixes.
408
408
409
409
.. _branch-merge :
410
410
411
- Backporting changes to Python 3.6 (or older version)
412
- ----------------------------------------------------
411
+ Backporting Changes to Older Version
412
+ ------------------------------------
413
413
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.
440
417
441
418
After the pull request has been merged, it can be backported using cherry_picker.py _.
442
419
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::
444
423
445
- [3.6] bpo-12345: Fix the Spam Module
424
+ git log -10 --oneline
446
425
447
426
Apply the label ``cherry-pick or X.Y `` to the backport pull request. Once the backport
448
427
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.
450
430
451
431
.. _cherry_picker.py : https://github.com/python/core-workflow/tree/master/cherry_picker
452
432
0 commit comments