automatic cherry-pick from one branch to another

329 views
Skip to first unread message

sivatheja reddy

unread,
Dec 2, 2019, 6:45:13 AM12/2/19
to Repo and Gerrit Discussion
Hello All,
How to automatic cherry-pick from one branch to another branch? We use gerrit 2.14.20 version. Please do the needful.

sivatheja reddy

unread,
Dec 3, 2019, 7:09:45 AM12/3/19
to Repo and Gerrit Discussion
Hi All,
Could anyone have a script for this, or any other idea. 

Björn Pedersen

unread,
Dec 4, 2019, 2:43:51 AM12/4/19
to Repo and Gerrit Discussion
Hi,

You should try to  explain what  you want ot achieve in a bit more words, as the question does not make any sense as is.

Björn

sivatheja reddy

unread,
Dec 4, 2019, 3:35:54 AM12/4/19
to Repo and Gerrit Discussion
Thanks Jorn, We have created feature branch which is pulled from master branch on need basis. And the every changes made in feature branch needs to automatic get into master branch. To achieve this I figured it out a way happen to cherry-pick. For this automatic cherry-pick , Do you a script i.e., when the change is merged to feature branch automatically it should get into master branch. Thanks.

Matthias Sohn

unread,
Dec 4, 2019, 5:52:25 AM12/4/19
to sivatheja reddy, Repo and Gerrit Discussion
On Wed, Dec 4, 2019 at 9:36 AM sivatheja reddy <sivath...@gmail.com> wrote:
Thanks Jorn, We have created feature branch which is pulled from master branch on need basis. And the every changes made in feature branch needs to automatic get into master branch. To achieve this I figured it out a way happen to cherry-pick. For this automatic cherry-pick , Do you a script i.e., when the change is merged to feature branch automatically it should get into master branch. Thanks.

I don't understand why you use a feature branch if you want to unconditionally auto-cherry-pick all
commits from the feature branch to the master branch.
Why don't you directly work with the master branch ? 

On Wednesday, December 4, 2019 at 1:13:51 PM UTC+5:30, Björn Pedersen wrote:
Hi,

You should try to  explain what  you want ot achieve in a bit more words, as the question does not make any sense as is.

Björn

Am Montag, 2. Dezember 2019 12:45:13 UTC+1 schrieb sivatheja reddy:
Hello All,
How to automatic cherry-pick from one branch to another branch? We use gerrit 2.14.20 version. Please do the needful.

--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/ec946b9e-db61-4261-af1d-742231034e01%40googlegroups.com.

Björn Pedersen

unread,
Dec 4, 2019, 7:46:38 AM12/4/19
to Repo and Gerrit Discussion


Am Mittwoch, 4. Dezember 2019 09:35:54 UTC+1 schrieb sivatheja reddy:
Thanks Jorn, We have created feature branch which is pulled from master branch on need basis. And the every changes made in feature branch needs to automatic get into master branch. To achieve this I figured it out a way happen to cherry-pick. For this automatic cherry-pick , Do you a script i.e., when the change is merged to feature branch automatically it should get into master branch. Thanks.

This is more  or less 'normal' behaviour in gerrit if used in the typical way.
You need to differentiate between local (working) feature branches, those are fine and long-lived feature branches in gerrit (the master repo).

For your use-case, local feature branches should push to refs/for/master and maybe you want cherry-pick  submit strategy set  as well.


Check e.g. Gerrit - Concepts and Workflows [1] for further details on how a good gerrit workflow looks like. It is different from a  github (pull-request based) workflow.

Björn


William

unread,
Dec 18, 2019, 6:25:46 PM12/18/19
to Repo and Gerrit Discussion
We do this auto-cherrypick in our team as part of change-merged hook,everytime a commit merges we use a bunch of git commands to cherrypick to the respective branches,it has been working reliably well for us
Reply all
Reply to author
Forward
0 new messages