Repoload - a change request download tool
repoload is a commandline tool, written in python3, that should make your
life and daily work with the repo tool and the gerrit review
system more pleasant.
repoload has currently only a very limited set of functionalities and a lot
of TODOS in the code, but it's already useful. The possibility to download
multiple CRs (Change Requests) by naming the crossrepo topic is the must-have
feature, because it's not supported by repo itself.
The full feature list is:
- Query gerrit for open CRs
- Query gerrit for open topic names
- Download a CR or multiple CRs linked by a topic at once.
It also works with gerrit using the autosubmitter plugin.
Usage
Before using repoload you have to install the script and configure the gerrit
server URL. See below.
The primary use case of repoload is to easily checkout crossrepo/ CRs
(Change Requests) from gerrit.
Example:
# Change directory into the repo checkout
$ cd to/repo/checkout
# Bring your repo checkout into a consistent state
# Beware: 'repo sync' maybe drops your local modifications without a warning
# Backup your code changes!
$ repo sync
# Query the gerrit server for open CRs
# You can use `grep` to filter for your coworker's CRs
$ repoload changes | grep -i john
123: Add feature A (Jon Doe <john.doe@my.corp.com>) [topic: crossrepo/feature-a]
128: Update library for feature A (John Doe <john.doe@my.corp.com>) [topic: crossrepo/feature-a]
[...]
# For downloading all CRs linked by a topic, just use the topic name
$ repload download crossrepo/feature-a
# For downloading only a single CR, use the CR number
$ repload download 123
# Build, test and have fun.
All repoload commands have an abbreviation:
$ repoload c # for 'changes'
$ repoload t # for 'topics'
$ repoload d # for 'download'
For further information see:
$ repoload --help
$ repoload download --help # and so forth
Installation
The installation of repoload is possible over PyPI or by directly using the
python script.
PyPI:
$ python3 -m pip install --user repoload
To manually install the self contained repoload.py python script. Just drop
the file in a folder that your environment variable PATH references.
Example:
$ mkdir -p ~/bin
$ cp repoload/repoload.py ~/bin/repoload
$ echo 'export PATH=$PATH:$HOME/bin' >> ~/.bashrc
$ chmod +x ~/bin/repoload # ensure that the script is executeable
After that the command repoload should be available in a newly started shell
and the command
$ repoload changes
should print a list of open change requests.
Repoload looks for the manifest repository configuration file to determine the
URL of the Gerrit server. It works automatically if the current working
directory is below a repo checkout. Alternatively, the environment variable
ANDROID_BUILD_TOP can be set to the directory where a repo checkout is
located. Finally, the URL can be set directly via the environment variable
GERRIT_URL.
Create and publish a release
To create a release of repoload additional packaging dependency's are needed:
$ python3 -m pip install --user --upgrade twine setuptools wheel
Next the release which is described in the setup.py file gets packaged.
The version number is taken from the repoload/repoload.py __VERSION__ string.
$ python3 setup.py sdist bdist_wheel
As final step the release can be uploaded to PyPI. See the PyPI documentation on how to configure the credentials for twine.
$ python3 -m twine upload dist/*
License
The code is licensed under the MIT License.
See the file COPYING.
Contribution
The project is open for contribution. Open a github pull request or send a patch via email. If you take the patch route, you can find our mail addresses in the git history easily.
Please add a Signed-off-by tag in the commit/patch message to state the
copyright ownership and license information of your patch. Read Developer
Certificate of Origin v1.1 to understand
the meaning and obligations your are taking by adding your sign-off. Thanks in
advance.
Metadata
Release files for repoload 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| repoload-0.2.tar.gz | 6.4 kB | Without provenance | Details for repoload-0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| repoload-0.2-py3-none-any.whl | Python 3 | none | any | Details for repoload-0.2-py3-none-any.whl |
Total release size: 14.2 kB
Release files / repoload-0.2.tar.gz
| Download URL | repoload-0.2.tar.gz |
|---|---|
| Size | 6.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a58c134e51e679a2f24d412e193dbd9aeeb2bc64ad4d36a9a52b17946c594d9d
|
|
BLAKE2b-256 checksum How to use checksums |
2f92350b2d3c943ea147a11d8a181ff6aa157963a3eeefdeefb100cfd408cb55
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.9
|
Release files / repoload-0.2-py3-none-any.whl
| Download URL | repoload-0.2-py3-none-any.whl |
|---|---|
| Size | 7.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
35df980eface8daa39c47ed2d233312fa277b2ce94504174a9ae684f8e04d4a6
|
|
BLAKE2b-256 checksum How to use checksums |
c4df1ad09014c4d21355666867aae50c93f1e291933966adc84c39b814d56d9f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.9
|
Security for repoload 0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.