How are we merging forward from the Bitbucket 3.5 repo?

So far I've accepted two pull requests into bitbucket.com/larry/cpython350 in the 3.5 branch, what will become 3.5.0rc2. As usual, it's the contributor's responsibility to merge forward; if their checkin goes in to 3.5, it's their responsibility to also merge it into the hg.python.org/cpython 3.5 branch (which will be 3.5.1) and default branch (which right now is 3.6). But... what's the plan here? I didn't outline anything specific, I just assumed we'd do the normal thing, pulling from 3.5.0 into 3.5.1 and merging. But of the two pull requests so far accepted, one was merged this way, though it cherry-picked the revision (skipping the pull request merge revision Bitbucket created), and one was checked in to 3.5.1 directly (no merging). I suppose we can do whatever we like. But it'd be helpful if we were consistent. I can suggest three approaches: 1. After your push request is merged, you cherry-pick your revision from bitbucket.com/larry/cpython350 into hg.python.org/cpython and merge. After 3.5.0 final is released I do a big null merge from bitbucket.com/larry/cpython350 into hg.python.org/cpython. 2. After your push request is merged, you manually check in a new equivalent revision into hg.python.org/cpython in the 3.5 branch. No merging necessary because from Mercurial's perspective it's unrelated to the revision I accepted. After 3.5.0 final is released I do a big null merge from bitbucket.com/larry/cpython350 into hg.python.org/cpython. 3. After your push request is merged, you pull from bitbucket.com/larry/cpython350 into hg.python.org/cpython and merge into 3.5. In this version I don't have to do a final null merge! I'd prefer 3; that's what we normally do, and that's what I was expecting. So far people have done 1 and 2. Can we pick one approach and stick with it? Pretty-please? //arry/

I presume the issue here is that Hg is so complicated that everyone knows a different subset of the commands and semantics. I personally don't know what the commands for cherry-picking a revision would be. I also don't know exactly what happens when you merge a PR using bitbucket. (I'm only familiar with the GitHub PR flow, and I don't like its behavior, which seems to always create an extra merge revision for what I consider as logically a single commit.) BTW When I go to https://bitbucket.org/larry/cpython350 the first thing I see (in a very big bold font) is "This is Python version 3.6.0 alpha 1". What's going on here? It doesn't inspire confidence. On Sun, Aug 16, 2015 at 10:13 AM, Larry Hastings <larry@hastings.org> wrote:
-- --Guido van Rossum (python.org/~guido)

On 2015-08-16, at 16:08 , Guido van Rossum <guido@python.org> wrote:
I presume the issue here is that Hg is so complicated that everyone knows a different subset of the commands and semantics.
I personally don't know what the commands for cherry-picking a revision would be.
graft
I also don't know exactly what happens when you merge a PR using bitbucket. (I'm only familiar with the GitHub PR flow, and I don't like its behavior, which seems to always create an extra merge revision for what I consider as logically a single commit.)
Same thing IIRC, I don't think there's a way to "squash" a merge via the web interface in either.
BTW When I go to https://bitbucket.org/larry/cpython350 the first thing I see (in a very big bold font) is "This is Python version 3.6.0 alpha 1". What's going on here? It doesn't inspire confidence.
It's the rendered content of the README file at the root of the repository, same as github.

On 16.08.2015 16:08, Guido van Rossum wrote:
You are probably looking at the default branch within that repo fork. This is the 3.5 branch: https://bitbucket.org/larry/cpython350/branch/3.5
-- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Aug 16 2015)
2015-08-12: Released mxODBC 3.3.4 ... http://egenix.com/go80 2015-08-22: FrOSCon 2015 ... 6 days to go ::::: Try our mxODBC.Connect Python Database Interface for free ! :::::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/

On 08/16/2015 07:08 AM, Guido van Rossum wrote:
There are a couple. The command you'd want for this use case is probably "hg transplant", because it lets you pull revisions from a different repo. Note that "transplant" is an extension; it's distributed with Mercurial but is turned off by default. (Presumably because it's an "unloved" feature, which seems to translate roughly to "deprecated and only minimally supported".) The Mercurial team recommends "graft", and they also provide "rebase", but neither of those can pull revisions from another repo. Since all revisions committed to 3.5.0 should be merged into 3.5.1 sooner or later, personally I don't see the *need* for cherry-picking.
Bitbucket doesn't appear to create any extraneous merge revisions. Of the two PRs I've accepted, only one created a merge, and that was sensible.
It was displaying the readme from the default branch. We use the 3.5 branch. I just went and looked, and there's a "default branch" option for the repo on Bitbucket. I changed it from "default" to "3.5" and now it displays "This is Python version 3.5.0 release candidate 1". Hopefully that inspires more confidence! / /arry/

On Sun, Aug 16, 2015 at 7:08 AM, Guido van Rossum <guido@python.org> wrote:
For whatever it's worth, this is a "feature": the extra merge revision serves as a record of the fact that a PR was merged, who merged it, and what the state of the branch was before and after the merge (useful in case the PR contains multiple revisions that are all getting merged together). These are all things that git makes impossible to reconstruct after the fact otherwise, because it stores no metadata about which branch each revision started out in. But if you consistently make a merge commit every time, then 'git log --first-parent' will reliably show one entry per merged PR. -n -- Nathaniel J. Smith -- http://vorpus.org

On Sun, 16 Aug 2015 00:13:10 -0700, Larry Hastings <larry@hastings.org> wrote:
Pick one Larry, you are the RM :) The reason you got different things was that how to do this was under-specified. Which of course we didn't realize, this being a new procedure and all. That said, I'm still not sure how (3) works. Can you give us a step by step like you did for creating the pull request? Including how it relates to the workflow for the other branches? (What I did was just do the thing I normally do, and then follow your instructions for creating a pull request using the same patch I had previously committed to 3.4.) --David

On Sun, 16 Aug 2015 11:24:32 -0400, "R. David Murray" <rdmurray@bitdance.com> wrote:
Thinking about this some more I realize why I was confused. My patch/pull request was something that got committed to 3.4. In that case, to follow your 3 I'd have to leave 3.4 open until you merged the pull request, and that goes against our normal workflow. Maybe my patch will be the only exception... --David

On 08/16/2015 08:24 AM, R. David Murray wrote:
Okay. Unsurprisingly, I pick what I called option 3 before. It's basically what we do now when checking in work to earlier-version-branches, with the added complexity of the Bitbucket repo. I just tried it and it seems fine.
I'll post a message describing the workflow to these two newsgroups (hopefully by today) and update the devguide (hopefully by tomorrow). There's no rush as I haven't accepted any pull requests recently, though I have a couple I should attend to. (For those waiting on a reply on pull requests, sit tight, I want to get these workflow docs done first, that way you'll know what to do if/when your pull request is accepted.) Thanks, everybody, //arry// /p.s. In case you're wondering, this RC period is way, way less stress than 3.4 was. Part of that is the workflow change, and part of it is that there just isn't that much people are trying to get in this time. In 3.4 I think I had 70 merge requests just from Victor for asyncio...!

The 3.5.0 patch flow question also brings up the question of how we are managing NEWS for 3.5.0 vs 3.5.1. We have some commits that are going in to both 3.5.0a2 and 3.5.1, and some that are only going in to 3.5.1. Currently the 3.5.1 NEWS says things are going in to 3.5.0a2, but that's obviously wrong. Do we relabel the section in 3.5.1 NEWS as 3.5.1a1? That would leave us with the 3.5.1 NEWS never having the last alpha sections from 3.5.0, which is logical but might be confusing (or is that the way we've done it in the past?) Do we leave it to the RM to sort out each individual patch when he merges 3.5.0 into the 3.5 branch? That sounds like a lot of work, although if there are few enough patches that go into the alphas, it might not be too hard. Either way, that final 3.5.0 merge is going to require an edit of the NEWS file. Larry, how do you plan to handle this? --David PS: We'll also need an answer to this question for the proposed new NEWS workflow of putting the NEWS items in the tracker. We'll probably need to introduce x.y.z versions into the tracker.

I presume the issue here is that Hg is so complicated that everyone knows a different subset of the commands and semantics. I personally don't know what the commands for cherry-picking a revision would be. I also don't know exactly what happens when you merge a PR using bitbucket. (I'm only familiar with the GitHub PR flow, and I don't like its behavior, which seems to always create an extra merge revision for what I consider as logically a single commit.) BTW When I go to https://bitbucket.org/larry/cpython350 the first thing I see (in a very big bold font) is "This is Python version 3.6.0 alpha 1". What's going on here? It doesn't inspire confidence. On Sun, Aug 16, 2015 at 10:13 AM, Larry Hastings <larry@hastings.org> wrote:
-- --Guido van Rossum (python.org/~guido)

On 2015-08-16, at 16:08 , Guido van Rossum <guido@python.org> wrote:
I presume the issue here is that Hg is so complicated that everyone knows a different subset of the commands and semantics.
I personally don't know what the commands for cherry-picking a revision would be.
graft
I also don't know exactly what happens when you merge a PR using bitbucket. (I'm only familiar with the GitHub PR flow, and I don't like its behavior, which seems to always create an extra merge revision for what I consider as logically a single commit.)
Same thing IIRC, I don't think there's a way to "squash" a merge via the web interface in either.
BTW When I go to https://bitbucket.org/larry/cpython350 the first thing I see (in a very big bold font) is "This is Python version 3.6.0 alpha 1". What's going on here? It doesn't inspire confidence.
It's the rendered content of the README file at the root of the repository, same as github.

On 16.08.2015 16:08, Guido van Rossum wrote:
You are probably looking at the default branch within that repo fork. This is the 3.5 branch: https://bitbucket.org/larry/cpython350/branch/3.5
-- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Aug 16 2015)
2015-08-12: Released mxODBC 3.3.4 ... http://egenix.com/go80 2015-08-22: FrOSCon 2015 ... 6 days to go ::::: Try our mxODBC.Connect Python Database Interface for free ! :::::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/

On 08/16/2015 07:08 AM, Guido van Rossum wrote:
There are a couple. The command you'd want for this use case is probably "hg transplant", because it lets you pull revisions from a different repo. Note that "transplant" is an extension; it's distributed with Mercurial but is turned off by default. (Presumably because it's an "unloved" feature, which seems to translate roughly to "deprecated and only minimally supported".) The Mercurial team recommends "graft", and they also provide "rebase", but neither of those can pull revisions from another repo. Since all revisions committed to 3.5.0 should be merged into 3.5.1 sooner or later, personally I don't see the *need* for cherry-picking.
Bitbucket doesn't appear to create any extraneous merge revisions. Of the two PRs I've accepted, only one created a merge, and that was sensible.
It was displaying the readme from the default branch. We use the 3.5 branch. I just went and looked, and there's a "default branch" option for the repo on Bitbucket. I changed it from "default" to "3.5" and now it displays "This is Python version 3.5.0 release candidate 1". Hopefully that inspires more confidence! / /arry/

On Sun, Aug 16, 2015 at 7:08 AM, Guido van Rossum <guido@python.org> wrote:
For whatever it's worth, this is a "feature": the extra merge revision serves as a record of the fact that a PR was merged, who merged it, and what the state of the branch was before and after the merge (useful in case the PR contains multiple revisions that are all getting merged together). These are all things that git makes impossible to reconstruct after the fact otherwise, because it stores no metadata about which branch each revision started out in. But if you consistently make a merge commit every time, then 'git log --first-parent' will reliably show one entry per merged PR. -n -- Nathaniel J. Smith -- http://vorpus.org

On Sun, 16 Aug 2015 00:13:10 -0700, Larry Hastings <larry@hastings.org> wrote:
Pick one Larry, you are the RM :) The reason you got different things was that how to do this was under-specified. Which of course we didn't realize, this being a new procedure and all. That said, I'm still not sure how (3) works. Can you give us a step by step like you did for creating the pull request? Including how it relates to the workflow for the other branches? (What I did was just do the thing I normally do, and then follow your instructions for creating a pull request using the same patch I had previously committed to 3.4.) --David

On Sun, 16 Aug 2015 11:24:32 -0400, "R. David Murray" <rdmurray@bitdance.com> wrote:
Thinking about this some more I realize why I was confused. My patch/pull request was something that got committed to 3.4. In that case, to follow your 3 I'd have to leave 3.4 open until you merged the pull request, and that goes against our normal workflow. Maybe my patch will be the only exception... --David

On 08/16/2015 08:24 AM, R. David Murray wrote:
Okay. Unsurprisingly, I pick what I called option 3 before. It's basically what we do now when checking in work to earlier-version-branches, with the added complexity of the Bitbucket repo. I just tried it and it seems fine.
I'll post a message describing the workflow to these two newsgroups (hopefully by today) and update the devguide (hopefully by tomorrow). There's no rush as I haven't accepted any pull requests recently, though I have a couple I should attend to. (For those waiting on a reply on pull requests, sit tight, I want to get these workflow docs done first, that way you'll know what to do if/when your pull request is accepted.) Thanks, everybody, //arry// /p.s. In case you're wondering, this RC period is way, way less stress than 3.4 was. Part of that is the workflow change, and part of it is that there just isn't that much people are trying to get in this time. In 3.4 I think I had 70 merge requests just from Victor for asyncio...!

The 3.5.0 patch flow question also brings up the question of how we are managing NEWS for 3.5.0 vs 3.5.1. We have some commits that are going in to both 3.5.0a2 and 3.5.1, and some that are only going in to 3.5.1. Currently the 3.5.1 NEWS says things are going in to 3.5.0a2, but that's obviously wrong. Do we relabel the section in 3.5.1 NEWS as 3.5.1a1? That would leave us with the 3.5.1 NEWS never having the last alpha sections from 3.5.0, which is logical but might be confusing (or is that the way we've done it in the past?) Do we leave it to the RM to sort out each individual patch when he merges 3.5.0 into the 3.5 branch? That sounds like a lot of work, although if there are few enough patches that go into the alphas, it might not be too hard. Either way, that final 3.5.0 merge is going to require an edit of the NEWS file. Larry, how do you plan to handle this? --David PS: We'll also need an answer to this question for the proposed new NEWS workflow of putting the NEWS items in the tracker. We'll probably need to introduce x.y.z versions into the tracker.
participants (6)
-
Guido van Rossum
-
Larry Hastings
-
M.-A. Lemburg
-
Nathaniel Smith
-
R. David Murray
-
Xavier Morel