Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

executable file 30 lines (22 sloc) 0.691 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
#!/bin/bash
set -e

# Uses push-to-hg to push revision(s) to the specified hg repository, and
# then runs the hg "trychooser" command for pushing the commits to the tryserver.

THIS_DIR=$(cd `dirname "$0"`; pwd)
TRYCHOOSER="$THIS_DIR/trychooser/trychooser"
PATH="$THIS_DIR:$PATH"

hg_cmd() {
  # Don't suppress HG output since trychooser uses prompts
  hg -R "$hg_repo" $@
}

hg_repo="$1"
if [[ "$1" == "-t" || "$1" == "--tip" ]]; then
hg_repo="$2"
fi

if [[ "$hg_repo" == "" ]]; then
echo "Usage: $(basename "$0") [-t/--tip] path-to-hg-repo [git-revs]" 1>& 2
  exit 255
fi

git push-to-hg $@

hg_cmd --config "extensions.trychooser=$TRYCHOOSER" trychooser
hg_cmd -q qpop -a > /dev/null
Something went wrong with that request. Please try again.