Guidance on merging(?)
Hi,
My hg skills are still fairly basic, and I'm looking for somebody who can mentor me (or at least point me in the right direction) with respect to making the same change across multiple versions of Python.
I have just made a one-line change to the 3.6 (default) branch:
https://hg.python.org/cpython/rev/2bf4a02f3570
and I'll like to apply it to 3.4 and 3.5 as well. I'm not sure if this is the right language: is this called a merge?
Can somebody point me at the right way to handle this? Last time I had a change to apply to all three versions, I manually applied it individually to each branch. I take it that's the wrong way to do it.
Thanks,
-- Steve
On Sun, May 8, 2016 at 4:18 PM, Steven D'Aprano steve@pearwood.info wrote:
Hi,
My hg skills are still fairly basic, and I'm looking for somebody who can mentor me (or at least point me in the right direction) with respect to making the same change across multiple versions of Python.
I have just made a one-line change to the 3.6 (default) branch:
https://hg.python.org/cpython/rev/2bf4a02f3570
and I'll like to apply it to 3.4 and 3.5 as well. I'm not sure if this is the right language: is this called a merge?
Hi Steven,
Since 2bf4a02f3570 is not a security fix, it can only go into 3.5 and default branches. See https://docs.python.org/devguide/index.html#status-of-python-branches for details.
Can somebody point me at the right way to handle this? Last time I had a change to apply to all three versions, I manually applied it individually to each branch. I take it that's the wrong way to do it.
I'd suggest the following steps:
$ hg update 3.5 # make the change in Lib/statistics.py $ hg commit $ hg update default # since the change is already in the default branch, we need to make a null merge $ hg merge 3.5 $ hg revert -ar default # if you can see merge conflicts, you can run the following command (optional) $ hg resolve -am # we can now commit $ hg commit $ hg push
A little bit detailed version of this can be found at https://docs.python.org/devguide/faq.html#how-do-i-make-a-null-merge
--Berker
On Sun, 8 May 2016 at 06:30 Berker Peksağ berker.peksag@gmail.com wrote:
On Sun, May 8, 2016 at 4:18 PM, Steven D'Aprano steve@pearwood.info wrote:
Hi,
My hg skills are still fairly basic, and I'm looking for somebody who can mentor me (or at least point me in the right direction) with respect to making the same change across multiple versions of Python.
I have just made a one-line change to the 3.6 (default) branch:
https://hg.python.org/cpython/rev/2bf4a02f3570
and I'll like to apply it to 3.4 and 3.5 as well. I'm not sure if this is the right language: is this called a merge?
Hi Steven,
Since 2bf4a02f3570 is not a security fix, it can only go into 3.5 and default branches. See https://docs.python.org/devguide/index.html#status-of-python-branches for details.
Can somebody point me at the right way to handle this? Last time I had a change to apply to all three versions, I manually applied it individually to each branch. I take it that's the wrong way to do it.
I'd suggest the following steps:
$ hg update 3.5 # make the change in Lib/statistics.py $ hg commit $ hg update default # since the change is already in the default branch, we need to make a null merge $ hg merge 3.5 $ hg revert -ar default # if you can see merge conflicts, you can run the following command (optional) $ hg resolve -am # we can now commit $ hg commit $ hg push
A little bit detailed version of this can be found at https://docs.python.org/devguide/faq.html#how-do-i-make-a-null-merge
And the reference on how to do this from the get-go starts at https://docs.python.org/devguide/committing.html#merging-order and continues on in that doc.
-Brett
--Berker
python-committers mailing list python-committers@python.org https://mail.python.org/mailman/listinfo/python-committers Code of Conduct: https://www.python.org/psf/codeofconduct/
2016-05-08 16:18 GMT+03:00 Steven D'Aprano steve@pearwood.info:
My hg skills are still fairly basic, and I'm looking for somebody who can mentor me (or at least point me in the right direction) with respect to making the same change across multiple versions of Python.
I have just made a one-line change to the 3.6 (default) branch:
https://hg.python.org/cpython/rev/2bf4a02f3570
and I'll like to apply it to 3.4 and 3.5 as well. I'm not sure if this is the right language: is this called a merge?
Can somebody point me at the right way to handle this? Last time I had a change to apply to all three versions, I manually applied it individually to each branch. I take it that's the wrong way to do it.
This is not security fix, thus it shouldn't be committed in 3.4.
You should now apply your patch to 3.5, commit it, merge the default branch with 3.5 (this will be null merge) and push your changes to main server.
For future, you should first commit your patch in 3.5, and then merge it in default.
On 08/05/16 15:31, Serhiy Storchaka wrote:
For future, you should first commit your patch in 3.5, and then merge it in default.
Yes, for the future, you should write the patch for the oldest branch appropriate and then just merge it to the next branches.
Let's say you have a security fich for 3.4 and up. You should write in in the 3.4 branch and then do a trivial merge from 3.4 to 3.5 and from 3.5 to default (3.6).
-- Jesús Cea Avión _/_/ _/_/_/ _/_/_/ jcea@jcea.es - http://www.jcea.es/ _/_/ _/_/ _/_/ _/_/ _/_/ Twitter: @jcea _/_/ _/_/ _/_/_/_/_/ jabber / xmpp:jcea@jabber.org _/_/ _/_/ _/_/ _/_/ _/_/ "Things are not so easy" _/_/ _/_/ _/_/ _/_/ _/_/ _/_/ "My name is Dump, Core Dump" _/_/_/ _/_/_/ _/_/ _/_/ "El amor es poner tu felicidad en la felicidad de otro" - Leibniz
participants (5)
-
Berker Peksağ
-
Brett Cannon
-
Jesus Cea
-
Serhiy Storchaka
-
Steven D'Aprano