Hi, Alec,
If all you want is one commit on the stable branch, you should look at 
squashing all commits from master into a single commit on the stable branch.

Alex

From: opnfv-tech-discuss-boun...@lists.opnfv.org 
[mailto:opnfv-tech-discuss-boun...@lists.opnfv.org] On Behalf Of Alec Hothan 
(ahothan)
Sent: Thursday, October 19, 2017 1:31 AM
To: Trevor Bramwell
Cc: opnfv-tech-discuss@lists.opnfv.org
Subject: Re: [opnfv-tech-discuss] [releng] How to merge master to euphrates 
with gerrit

Hi Trevor,

Thanks for the tip!
If I am not mistaken that will result in as many commits in euphrates as there 
are commits to cherry-pick from master?
Although you achieve the same final state in stable/euphrates you do end up 
with potentially significantly more commits than a simple merge. I think it is 
best to keep release branches clean and devoid of unnecessary detailed commits.
I was just looking at the functest repo and they do have tons of small commits 
in their release branch, which is the result of multiple cherry picking.
In my case I have well over 40 commits to merge into stable/euphrates so that 
requires as many gerrit reviews and result in as many commits on the release 
branch (I only need one – not 40+)… ;-(

Is there any objection to allow merges to be submitted in git review? They 
should be reviewed equally and can be accepted/rejected by committers.
I think this requires adding the “Push Merge Commit” access right for the 
“refs/for/refs/*” reference in Gerrit.

See gerrit doc at: 
https://codereview.qt-project.org/Documentation/access-control.html#category_push_merge

If we want to allow all projects to submit merges to gerrit (such as syncing 
master to their stable branch), we’d need to enable it for All-Projects:
https://gerrit.opnfv.org/gerrit/#/admin/projects/All-Projects,access<https://url10.mailanyone.net/v1/?m=1e4wrT-0002ZU-4b&i=57e1b682&c=a2g_4BpDOQ6btXvlnpkYLPFIeukquaxWtcyeDVq81_1xDr8OjzcxllX6V7Ytwi-QhMo7t8bMkT68A8KiUPF5iSR23zwNbxBA4JvgMGKm4dHU8fOEVVT59mcuVcNhTRPvQ-j11cHBysQtSlPcOvyq4tUekYO4LgSi6kicOqfQe1Ja26HqUzw1obh59eTpE3fgnMVT7n4rcXKuH6BIh2t2iFt4yX2aqLog8MMqmK-wUF8yt2Yd2QdbP3hiKrRyWn4RUj-7jc3zyljcK7sXBSLPCw>

I think that will result in “cleaner” stable branches.


David and all: note that this ability to submit merges in Gerrit (sync content 
of one branch to another) might be needed for XCI if we move towards the use of 
a long-lived “stable” branch (a branch that contains only stable commits off 
master that are validated for XCI usage) that sits between master (which 
contains all dev commits subject to each project CI but not necessarily vetted 
for XCI use) and the release branches (which contain only release material and 
would then be branched off the stable branch). The benefit of this extra stable 
branch is you can effectively run CD/XCI anytime and well before release 
branches are even created.
I’ll try to send out a diagram of how that branching model works out with CI 
and XCI.

Thanks

   Alec






From: Trevor Bramwell 
<tbramw...@linuxfoundation.org<mailto:tbramw...@linuxfoundation.org>>
Date: Wednesday, October 18, 2017 at 3:04 PM
To: "Alec Hothan (ahothan)" <ahot...@cisco.com<mailto:ahot...@cisco.com>>
Cc: 
"opnfv-tech-discuss@lists.opnfv.org<mailto:opnfv-tech-discuss@lists.opnfv.org>" 
<opnfv-tech-discuss@lists.opnfv.org<mailto:opnfv-tech-discuss@lists.opnfv.org>>
Subject: Re: [opnfv-tech-discuss] [releng] How to merge master to euphrates 
with gerrit

Hey Alec,

Here's a quick way to cherry-pick these all over to the stable/euphrates
branch. Though you'll still need to submit them all through Gerrit:

  git checkout euphrates
  git cherry -v stable/euphrates master | cut -d' ' -f2 | xargs -I{} git 
cherry-pick -x '{}'

'git review' will ask you to confirm you want to upload multiple
patchsets. A 'yes' should put all of them up for review.

Regards,
Trevor Bramwell

On Wed, Oct 18, 2017 at 08:14:59PM +0000, Alec Hothan (ahothan) wrote:
I have many commits in master which I’d like to merge to stable/euphrates.
Would like to check if anybody knows how to merge master into a release branch 
using gerrit?
Looks like I may need the permission to upload merges with Gerrit.
Here is what I did:
$ git fetch origin  stable/euphrates:euphrates
$ git checkout euphrates
$ git merge master –no-ff
# at this point, so far so good, I got all my commits into my euphrates branch
# git review fails due to permission:
$ git review
Warning: Permanently added '[gerrit.opnfv.org]:29418,[198.145.29.81]:29418' 
(RSA) to the list of known hosts.
remote: Processing changes: refs: 1, done
To ssh://gerrit.opnfv.org:29418/nfvbench.git
! [remote rejected] HEAD -> refs/publish/master/euphrates (you are not allowed 
to upload merges)
error: failed to push some refs to 
'ssh://ahot...@gerrit.opnfv.org:29418/nfvbench.git'
Is there a different way to achieve this?
I do not want to cherry pick my commits as I have too many of them.
Thanks
   Alec

_______________________________________________
opnfv-tech-discuss mailing list
opnfv-tech-discuss@lists.opnfv.org<mailto:opnfv-tech-discuss@lists.opnfv.org>
https://lists.opnfv.org/mailman/listinfo/opnfv-tech-discuss<https://url10.mailanyone.net/v1/?m=1e4wrT-0002ZU-4b&i=57e1b682&c=CYommRDKoMvxF4ZMwWpL_Y0pl8MzkDAqqlZicUpIpYjYKhbWeCA-Q2EEJP1yyF012n5XldaJlLpm7cfIituU-jN98Jz1j83pBSGr1c6asOW1Mxun6Wr3OxGcGk1yQjkvYeQ7HKhIC8o32-CZgSZ3jiwPFnbrECdnMmaf9ujB2Jw88sbASvY9k6MEK1wOfjUcxt3v7m_1oilP5762AzTcWABihOLBSVQ0BvnZM6HrNjUQnplZMfP3kmiOqMXCqtyzu0lSiEfkVaFvauNoKD7P_Q>


_______________________________________________
opnfv-tech-discuss mailing list
opnfv-tech-discuss@lists.opnfv.org
https://lists.opnfv.org/mailman/listinfo/opnfv-tech-discuss

Reply via email to