Hello Alec,

Yes Functest conforms with the "classical" guidelines as we "cherry-pick"
the commits from master to stable/euphrates.
It results in small commits because all are small bugfixes before the
release. That's the best way to easily maintain the branches.
Ii could be noted that we also mention if a conflict occurs when
"cherry-picking".
https://git.opnfv.org/functest/commit/?h=stable/euphrates&id=fed72336e3b50b8441f233a2f122e482ee83ae8c

I strongly advise not to squash the commits into one commit as you can't
compare the branches and the result can't be easily reviewed.
Merging patches is automatically done by gerrit not by the user (even if
the merge commit is associated to one author what breaks bitergia stats).

You're free to apply a special commit for stable/euphrates if it's the only
technical solution:
https://git.opnfv.org/functest/commit/?h=stable/euphrates&id=28a8e9c5a1e442c866947455dfe8cbe47b66a0c7

Regarding your issue, I would "cherry-pick" every commit by hand, one after
the others (you can call only one git review as previously proposed) .
Instead of applying a script to sync master and stable/euphrates, I would
seriously reconsider destroying/recreating stable/euphrates.

Cédric


2017-10-19 16:27 GMT+02:00 Alec Hothan (ahothan) <ahot...@cisco.com>:

> Cedric,
>
>
>
> This openstack document describes the normal dev workflow. The Merge
> section in the document is related to what Gerrit does when a patchset is
> +2. In this thread, we’re talking about the ability to submit a merge
> request to Gerrit (so this is before +2 is done).
>
> The notion of branch merge to a release branch is part of the release
> model, meaning how do you move content from a non release branch (e.g.
> master) to a release branch. As of today the only way to do this from
> master to a stable branch is by cherry-picking. I think we should allow
> merges to be submitted to gerrit. Those merge requests can of course be
> approved or rejected by committers – same as normal patchsets.
>
>
>
> Here is a diagram that shows the difference between a cherry-pick and a
> merge from master to a release branch:
>
>
>
> With todays gerrit settings we can’t do merges because we cannot even
> submit them for gerrit reviews, we can only do cherry picking.
>
> I have currently ~40 commits sitting on master than I want to get into
> stable/euphrates. Only option for me is to do a rebase + squash. What I am
> losing (vs. a merge) is the arrow between my current tip of master and what
> will become the opnfv-5.0.0 commit. So if somebody looks at the git log
> later (say in a year) it won’t be obvious at all that this release commit
> has all the content of master up to the current tip because git will not
> represent that link.
>
> Is it going to jeopardize my euphrates release content? No. But as a
> maintainer it would have been really helpful to keep that formal link in
> the repo.
>
>
>
> This could be enabled very easily – only one place to change in the
> All-Projects config of gerrit. But it looks like it will take time to get
> this approved.
>
>
>
> For XCI, merging between branches will be inevitable to prevent
> multiplication of identical commits across branches.
>
>
>
> Regards,
>
>
>
>    Alec
>
>
>
>
>
>
>
>
>
> *From: *Cedric OLLIVIER <ollivier.ced...@gmail.com>
> *Date: *Wednesday, October 18, 2017 at 11:09 PM
> *To: *"Yujun Zhang (ZTE)" <zhangyujun+...@gmail.com>
> *Cc: *Trevor Bramwell <tbramw...@linuxfoundation.org>, "Alec Hothan
> (ahothan)" <ahot...@cisco.com>, "opnfv-tech-discuss@lists.opnfv.org" <
> opnfv-tech-discuss@lists.opnfv.org>
> *Subject: *Re: [opnfv-tech-discuss] [releng] How to merge master to
> euphrates with gerrit
>
>
>
> Hello,
>
>
>
> I would advice the offical OpenStack documentation about this topic:
>
> https://docs.openstack.org/infra/manual/developers.html
>
>
>
> Cédric
>
>
>
> 2017-10-19 4:23 GMT+02:00 Yujun Zhang (ZTE) <zhangyujun+...@gmail.com>:
>
> This could do the trick but I don't quite recommend it. There would be some
>
> commits on master you do NOT want to include in stable branches.
>
>
>
> I suggest to pick commits carefully after inspection and do the cherrypick
>
> one by one on gerrit. It will keep a record of which patch sets have been
>
> cherry-picked in review history (not just git log).
>
>
>
> If you have too many patch sets to be cherrypicked. Something may have gone
>
> wrong. By the time we created stable branch, it should be considered as a
>
> stable branch and not expecting too many changes, except for bug fix and
>
> document amending.
>
>
>
> My 2 cents.
>
>
>
> On Thu, Oct 19, 2017 at 6:04 AM Trevor Bramwell
>
> <tbramw...@linuxfoundation.org> wrote:
>
>
>
> 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
>
> > https://lists.opnfv.org/mailman/listinfo/opnfv-tech-discuss
>
>
>
> _______________________________________________
>
> opnfv-tech-discuss mailing list
>
> opnfv-tech-discuss@lists.opnfv.org
>
> https://lists.opnfv.org/mailman/listinfo/opnfv-tech-discuss
>
>
>
> --
>
> Yujun Zhang
>
>
>
> _______________________________________________
>
> opnfv-tech-discuss mailing list
>
> opnfv-tech-discuss@lists.opnfv.org
>
> https://lists.opnfv.org/mailman/listinfo/opnfv-tech-discuss
>
>
>
>
>
_______________________________________________
opnfv-tech-discuss mailing list
opnfv-tech-discuss@lists.opnfv.org
https://lists.opnfv.org/mailman/listinfo/opnfv-tech-discuss

Reply via email to