[OpenStack-Infra] creating branch in gerrit using commandline

Thierry Carrez thierry at openstack.org
Thu Jan 22 14:12:54 UTC 2015


Christian Berendt wrote:
> On 01/21/2015 08:17 PM, Vinay Mahuli wrote:
>> We generally create branches in gerrit using the web ui accessing admin
>> -> projects -> select project -> branches
>>
>> Is it possible to do it using command line? 
>> I need to automate creation of branch in gerrit with a script. 
> 
> I have not tested it, but this should be possible by using the Gerrit
> API as documented at
> https://gerrit-review.googlesource.com/Documentation/rest-api-projects.html#create-branch.
> 
> A client to access the Gerrit API is available at
> https://pypi.python.org/pypi/gerritlib.

It's also possible to simply push the branch, if you have the required
permissions in Gerrit.

That's what the release script which creates proposed/$SERIES branch
operates:

http://git.openstack.org/cgit/openstack-infra/release-tools/tree/rccut.sh#n77

-- 
Thierry Carrez (ttx)



More information about the OpenStack-Infra mailing list