#!/bin/bash -xe # Your name NAME="$1" # Your username used in kerberos, ssh, email USERNAME="$2" # The branch of the distribution DIST_BRANCH=${3:-rhos-6.0-rhel-7} # The branch on the rhos remote RHOS_BRANCH=${4:-rhos-6.0-patches} EMAIL="$USERNAME@redhat.com" KERB="$USERNAME@REDHAT.COM" # The rhos package you want to work on PACKAGE="openstack-ceilometer" # The git remote for upstream OPENSTACK_REMOTE="http://git.openstack.org/openstack/ceilometer.git" # The git remote for rhos patches RHOS_REMOTE="ssh://$USERNAME@code.engineering.redhat.com:22/ceilometer.git" # Configure self for git git config --global user.name "$NAME" git config --global user.email "$EMAIL" # Initially kerberose kinit $KERB # Clone the package we want to work with and go there rhpkg clone $PACKAGE cd $PACKAGE # Checkout the branch for the distribution we care about # Why do this? git checkout $DIST_BRANCH # Add remotes for upstream and rhos-patches git remote add -f --tags openstack $OPENSTACK_REMOTE git remote add -f rhos $RHOS_REMOTE # Checkout the rhos-patches branch that we are working on git checkout $RHOS_BRANCH # Initialize git review # NOTE(cdent): Is this step necessary, I thought modern git review did it for # you, need to test. git review -s sed -i -e '$ i [ -f .gitreview ] || exit 0' .git/hooks/commit-msg