@@ -206,18 +206,6 @@ Solution::
206
206
$ git push --force origin some-branch
207
207
208
208
209
- Backporting Merged Changes
210
- --------------------------
211
-
212
- A pull request may need to be backported into one of the maintenance branches
213
- after it has been accepted and merged into ``master ``. It is usually indicated
214
- by the label ``needs backport to X.Y `` on the pull request itself.
215
-
216
- Use the utility script `cherry_picker.py <https://github.com/python/core-workflow/tree/master/cherry_picker >`_
217
- from the `core-workflow <https://github.com/python/core-workflow >`_
218
- repository to backport the commit.
219
-
220
-
221
209
.. _git_from_mercurial :
222
210
223
211
Applying a Patch from Mercurial to Git
@@ -313,6 +301,34 @@ Pull requests can be accepted and merged by a Python Core Developer.
313
301
3. Press the ``Confirm squash and merge `` button.
314
302
315
303
304
+ Backporting Merged Changes
305
+ --------------------------
306
+
307
+ A pull request may need to be backported into one of the maintenance branches
308
+ after it has been accepted and merged into ``master ``. It is usually indicated
309
+ by the label ``needs backport to X.Y `` on the pull request itself.
310
+
311
+ Use the utility script `cherry_picker.py <https://github.com/python/core-workflow/tree/master/cherry_picker >`_
312
+ from the `core-workflow <https://github.com/python/core-workflow >`_
313
+ repository to backport the commit.
314
+
315
+ The commit hash for backporting is the squashed commit that was merged to
316
+ the ``master `` branch. On the merged pull request, scroll to the bottom of the
317
+ page. Find the event that says something like::
318
+
319
+ <coredeveloper> merged commit <commit_sha1> into python:master <sometime> ago.
320
+
321
+ By following the link to ``<commit_sha1> ``, you will get the full commit hash.
322
+
323
+ Alternatively, the commit hash can also be obtained by the following git commands::
324
+
325
+ $ git fetch upstream
326
+ $ git rev-parse ":/bpo-12345"
327
+
328
+ The above commands will print out the hash of the commit containing ``"bpo-12345" ``
329
+ as part of the commit message.
330
+
331
+
316
332
Editing a Pull Request Prior to Merging
317
333
---------------------------------------
318
334
0 commit comments