RETIRED, Check out repos hosted on gerrit and apply a list of outstanding patches.
Go to file
tchaypo 99fdec9c1c Add a .gitreview file
Change-Id: I63d496bbd6df656cd583d0eadfcc1d70687d39ba
2015-01-17 19:51:21 +00:00
doc/source Basic packagizing and preparation for Jenkins 2014-12-13 20:09:47 +01:00
prep_source_repos Basic packagizing and preparation for Jenkins 2014-12-13 20:09:47 +01:00
.gitignore Basic packagizing and preparation for Jenkins 2014-12-13 20:09:47 +01:00
.gitreview Add a .gitreview file 2015-01-17 19:51:21 +00:00
AUTHORS Basic packagizing and preparation for Jenkins 2014-12-13 20:09:47 +01:00
CONTRIBUTING.rst Basic packagizing and preparation for Jenkins 2014-12-13 20:09:47 +01:00
COPYRIGHT INIT 2014-05-28 16:46:22 -07:00
ChangeLog Basic packagizing and preparation for Jenkins 2014-12-13 20:09:47 +01:00
README.rst Basic packagizing and preparation for Jenkins 2014-12-13 20:09:47 +01:00
repo_refs.yaml Late bound references for the win. 2014-08-07 13:59:42 +12:00
requirements.txt Basic packagizing and preparation for Jenkins 2014-12-13 20:09:47 +01:00
setup.cfg Basic packagizing and preparation for Jenkins 2014-12-13 20:09:47 +01:00
setup.py Basic packagizing and preparation for Jenkins 2014-12-13 20:09:47 +01:00
test-requirements.txt Basic packagizing and preparation for Jenkins 2014-12-13 20:09:47 +01:00
tox.ini Basic packagizing and preparation for Jenkins 2014-12-13 20:09:47 +01:00

README.rst

prep_source_repos

Introduction

This repository contains scripts for managing multiple outstanding patches to a gerrit based project. It was initially developed for managing TripleO deployments, and still makes certain TripleOish assumptions (patches welcome if you find the tool more generally useful)

The source repo includes:

  • tooling to combine arbitrary unmerged gerrit patches (prep_source_repos) which will also export an rc file with git refs based on the combined branches
  • a sample config file that we're using for our TripleO deployments (repo_refs.yaml)

Usage

  • create a repo_refs.yaml (see the one in the root of this repository for inspiration).

  • run prep_source_repos $YOUR_REFS_FILE $DESTINATIION_DIR to checkout and update the repositories specified by the refs file (in a TripleO context, $DESTINATION_DIR will usually be "$TRIPLEO_ROOT").

    Note that local edits are saved via git stash whenever you refresh your source repos, and restored after the update (which may, of course, fail). This provides a convenient way to use local edits / work in progress for repositories that are used directly (vs e.g. those that are cloned into images).

  • (optional) source YOUR_REFS_FILE.variables to configure TripleO scripts to use your freshly integrated branches

  • proceed with any tripleo activies you might have (building images, deploying, etc etc).

Advanced use

Refs that don't match the xx/yy/zz form of gerrit refs are presumed to be local work-in-progress branches. These are not fetched, but are merged into the rollup branch along with all the other patches. With a little care this permits working effectively with multiple patchsets in one project without them being made into a stack in gerrit.

Refs of the form xx/yy/0 are late-bound references to gerrit - they will use the gerrit REST API to find out the latest version and will use that.

When running prep-source-repos any additional arguments after the refs and output dir are used to filter the repositories to fetch - so when working on (say) two local orthogonal patches to nova, and you need to update your rollup branch just do:

prep-source-repos foo bar nova

and only nova will be updated.