RETIRED, Check out repos hosted on gerrit and apply a list of outstanding patches.
Go to file
James Polley 0c208d62c3 Basic packagizing and preparation for Jenkins
Hard-coding the path to the interpreter causes problems when running
inside a virtualenv - eg, if pyyaml is installed inside the virtualenv
but not in the system python, this will give an import error rather than
finding the virtualenv's version of pyyaml

Turn this into a package.

* Update .gitignore to ignore virtualenv cruft
* Add basic requirements
* Basic packageization.
* Readme has been tweaked to reflect the fact that this is now a more
  generic tool.
* Further packageization
* Add tox.ini and test-requirements.txt
  This will enable testing on patches pushed up to stackforge
  Right now we're only running basic pep8 tests.

Change-Id: I9897a4da863dbf61700812cb436bd1d46e92b950
2015-01-17 21:35:47 +00:00
doc/source Basic packagizing and preparation for Jenkins 2015-01-17 21:35:47 +00:00
prep_source_repos Basic packagizing and preparation for Jenkins 2015-01-17 21:35:47 +00:00
.gitignore Basic packagizing and preparation for Jenkins 2015-01-17 21:35:47 +00:00
AUTHORS Basic packagizing and preparation for Jenkins 2015-01-17 21:35:47 +00:00
CONTRIBUTING.rst Basic packagizing and preparation for Jenkins 2015-01-17 21:35:47 +00:00
COPYRIGHT INIT 2014-05-28 16:46:22 -07:00
ChangeLog Basic packagizing and preparation for Jenkins 2015-01-17 21:35:47 +00:00
README.rst Basic packagizing and preparation for Jenkins 2015-01-17 21:35:47 +00: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 2015-01-17 21:35:47 +00:00
setup.cfg Basic packagizing and preparation for Jenkins 2015-01-17 21:35:47 +00:00
setup.py Basic packagizing and preparation for Jenkins 2015-01-17 21:35:47 +00:00
test-requirements.txt Basic packagizing and preparation for Jenkins 2015-01-17 21:35:47 +00:00
tox.ini Basic packagizing and preparation for Jenkins 2015-01-17 21:35:47 +00: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.