Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Document ASF review process and tooling.
  • Loading branch information
kevints committed Dec 5, 2013
1 parent b4da3c3 commit d51fecab9eb75a92e1b774fff31f746b55111c82
Show file tree
Hide file tree
Showing 6 changed files with 90 additions and 25 deletions.
@@ -6,9 +6,10 @@
.coverage
.gradle/
.pants.*
.reviewboardrc
.vagrant/
build/
build-support/rbtools/
build-support/virtualenv-*
dist/
gradle-app.setting
out/
@@ -0,0 +1,3 @@
REPOSITORY = "aurora"
REVIEWBOARD_URL = "https://reviews.apache.org"
TARGET_GROUPS = "Aurora"
@@ -0,0 +1,25 @@
#!/bin/sh -ex
# Wrapper for self-bootstrapping virtualenv
VIRTUALENV_VERSION=1.10.1

if which python2.7 >/dev/null; then
PY=`which python2.7`
elif which python2.6 >/dev/null; then
PY=`which python2.6`
else
echo 'No python interpreter found on the path. Python will not work!' 1>&2
exit 1
fi

echo "Using $PY" >&2

if ! [ -f "build-support/virtualenv-$VIRTUALENV_VERSION/BOOTSTRAPPED" ]; then
pushd build-support
curl -O https://pypi.python.org/packages/source/v/virtualenv/virtualenv-$VIRTUALENV_VERSION.tar.gz
tar zxvf virtualenv-$VIRTUALENV_VERSION.tar.gz
# TODO(ksweeney): Checksum
touch virtualenv-$VIRTUALENV_VERSION/BOOTSTRAPPED # 2PC
popd
fi

exec "$PY" build-support/virtualenv-$VIRTUALENV_VERSION/virtualenv.py "$@"
@@ -0,0 +1,45 @@
Getting your ReviewBoard Account
--------------------------------
Go to https://reviews.apache.org and create an account.

Setting up your ReviewBoard Environment
---------------------------------------
Run `./rbt status`. The first time this runs it will bootstrap and you will be asked to login.
Subsequent runs will cache your login credentials.

Submitting a Patch for Review
-----------------------------
Post a review with `rbt`, fill out the fields in your browser and hit Publish.

./rbt post -o -g

Updating an Existing Review
---------------------------
Incorporate review feedback, make some more commits, update your existing review, fill out the
fields in your browser and hit Publish.

./rbt post -o -r <RB_ID>

Merging Your Own Review (Committers)
------------------------------------
Once you have shipits from the right committers, merge your changes in a single squash commit
and mark the review as submitted. The typical workflow is

git checkout master
git pull origin master
git merge --squash my_feature_branch
git commit
git show master # Verify everything looks sane
git push origin master
./rbt close <RB_ID>
git branch -d my_feature_branch

Merging Someone Else's Review
-----------------------------
Sometimes you'll need to merge someone else's RB. The typical workflow for this is

git checkout master
git pull origin master
./rbt patch -c <RB_ID>
git show master # Verify everything looks sane, author is correct
git push origin master
27 pants
@@ -2,7 +2,6 @@

PANTS_ROOT=$(dirname "$0")
PANTS_VERSION=$(cat "$PANTS_ROOT/.pantsversion")
VIRTUALENV_VERSION=1.10.1

if [[ -e "$PANTS_ROOT/pants.pex" ]]; then
cat <<EOF | PANTS_ROOT="$PANTS_ROOT" PANTS_VERSION=$PANTS_VERSION python
@@ -31,34 +30,14 @@ fi

PANTS_TEMP=$(mktemp -d /tmp/pants.XXXXXX)

if which python2.7 >/dev/null; then
PY=$(which python2.7)
elif which python2.6 >/dev/null; then
PY=$(which python2.6)
elif which python3 >/dev/null; then
PY=$(which python3)
else
echo 'No python interpreter found on the path. Python will not work!' 1>&2
exit 1
fi

echo 'Using '$PY 1>&2

./build-support/virtualenv "$PANTS_TEMP/tcp"
pushd "$PANTS_TEMP"

curl -O https://pypi.python.org/packages/source/v/virtualenv/virtualenv-$VIRTUALENV_VERSION.tar.gz
tar -zxf virtualenv-$VIRTUALENV_VERSION.tar.gz
$PY virtualenv-$VIRTUALENV_VERSION/virtualenv.py tcp
source tcp/bin/activate

pip install twitter.common.python==0.2.0

cat <<EOF | \
PYTHON_VERBOSE=1 \
PEX_VERBOSE=1 \
PANTS_VERSION=$PANTS_VERSION python
import os
PYTHON_VERBOSE=1 PEX_VERBOSE=1 python <<EOF
from twitter.common.python.fetcher import Fetcher, PyPIFetcher
from twitter.common.python.http import Crawler
from twitter.common.python.obtainer import Obtainer
@@ -68,7 +47,7 @@ from twitter.common.python.translator import Translator
pb = PEXBuilder()
resolver = Resolver(crawler=Crawler(), fetchers=[PyPIFetcher()])
req = 'twitter.pants==' + os.environ['PANTS_VERSION']
req = 'twitter.pants==$PANTS_VERSION'
pb.add_requirement(req)
for dist in resolver.resolve(req):
pb.add_distribution(dist)
12 rbt
@@ -0,0 +1,12 @@
#!/bin/sh -e
# Wrapper script for self-bootstrapping rbt.
# TODO(ksweeney): Use ./pants py here instead of virtualenv.
if ! [ -f build-support/rbtools/BOOTSTRAPPED ]; then
echo Bootstrapping rbtools
./build-support/virtualenv build-support/rbtools
source build-support/rbtools/bin/activate
pip install RBTools==0.5
touch build-support/rbtools/BOOTSTRAPPED
fi
source build-support/rbtools/bin/activate
exec rbt "$@"

0 comments on commit d51feca

Please sign in to comment.