Skip to content

Instantly share code, notes, and snippets.

@xeonchen
Last active January 19, 2017 13:47
Show Gist options
  • Save xeonchen/1e7bead7008e21751fcddf3651486f5e to your computer and use it in GitHub Desktop.
Save xeonchen/1e7bead7008e21751fcddf3651486f5e to your computer and use it in GitHub Desktop.
#!/bin/sh
DIR=${1:-gecko}
function setup() {
set -e
git init $1 && cd $1
git config fetch.prune true
git config push.default upstream
# config unified
git remote add mozilla hg::https://hg.mozilla.org/mozilla-unified -t bookmarks/central
git remote set-url --push mozilla hg::ssh://hg.mozilla.org/integration/mozilla-inbound
git config remote.mozilla.fetch +refs/heads/bookmarks/*:refs/remotes/mozilla/*
# config try
git remote add try hg::https://hg.mozilla.org/try
git config remote.try.skipDefaultUpdate true
git remote set-url --push try hg::ssh://hg.mozilla.org/try
git config remote.try.push +HEAD:refs/heads/branches/default/tip
# fetch
git remote update
}
setup $DIR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment