Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/championswimmer/pyrrit
Simple python client for gerrit. To enable quick patchset listings, pushing and pulling.
https://github.com/championswimmer/pyrrit
Last synced: 29 days ago
JSON representation
Simple python client for gerrit. To enable quick patchset listings, pushing and pulling.
- Host: GitHub
- URL: https://github.com/championswimmer/pyrrit
- Owner: championswimmer
- Created: 2014-07-27T21:26:14.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-10-24T21:15:43.000Z (about 10 years ago)
- Last Synced: 2024-05-02T00:10:58.391Z (7 months ago)
- Language: Python
- Size: 273 KB
- Stars: 3
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# pyrrit
#### pyrrit is the missing link between an android source tree and it's gerrit review## Introduction
pyrrit was written by me to help myself and my codevelopers
at [AOKP](http://aokp.co)
Our source code is [here](http://github.com/AOKP)
and our code review [here](http://gerrit.aokp.co)The idea of pyrrit is to be able to view open changes on the code review,
pull them, test them, verify/review them etc right from the command line
without having to open gerrit in a browser.## Installation
In it's current form pyrrit is suitable to be used only for an
AOSP-like source code tree, although it can be adapted for other needs.The pyrrit folder (containing \__main\__.py, utils.py etc) should
go into the build folder. i.e. $source_top/build/tools/pyrritYou will need to edit the contents of build/pyrrit/config.py according to
your environment. Your gerrit's location and ports will be different ;)
For eg. at AOKP, a project like AOKP/vendor_aokp maps to a project
directory at $source_top/vendor/aokp## Usage
You can make calls to pyrrit like
python2.7 build/tools/pyrrit [arguments]Or, preferrably, you can add a function to your envsetup.sh
function pyrrit()
{
T=$(gettop)
python2.7 ${T}/build/tools/pyrrit $@
}Then using pyrrit becomes easier like
. build/envsetup.sh
pyrrit [arguments]Running pyrrit without arguments or running "pyrrit help" will show
you the help text. For other functions continue reading.### Listing Changes
pyrrit can list all open changes on gerrit using this commandpyrrit list
Or you can check your open changes of singular projects like
pyrrit list vendor/aokp
Note, you dont need to provide the project name like "AOKP/vendor_aokp"
Just provide the directory path, and pyrrit will figure the rest.### Pulling Changes
pyrrit can pull changes using a command like thispyrrit pull 17723
This will get change no. 17723, and cherry-pick it to it's project directory.
You can call this function from anywhere. Pyrrit will always cherry-pick into
the correct location only. It wont pull stuff into wrong projects. :)You can pull multiple changes together
pyrrit pull 17723 17712 17775
Generally pyrrit pulls the most current revision of the given change. But if
you wish to, you can specify the change revision no.pyrrit pull 17723 17712/2 17775/1
Also if you leave the revision empty like thispyrrit pull 17723/
In that case pyrrit will ask you for revision number when pulling that change### Pulling a topic
pyrrit can pull all changes of a particular topic using a command like thispyrrit topicpull topic_name
This pulls all changes (in all projects and directories) that have "topic_name" as their topic.