Tiny updates to trychange_git.
The actual refs will be "refs/tryjobs/blah" to mirror ChromeOS's system.
R=iannucci@chromium.org
Review URL: https://chromiumcodereview.appspot.com/23452051
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/chromium-jobqueue@224540 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/trychange_git.py b/trychange_git.py
index 28f708b..db32476 100755
--- a/trychange_git.py
+++ b/trychange_git.py
@@ -5,7 +5,7 @@
"""Client-side script to send local git changes to a tryserver.
-It pushes the local feature branch to a private ref on googlesource
+It pushes the local feature branch to a private try-ref on the central repo
and posts a description of the job to an appengine instance, where it will get
picked up by the buildbot tryserver itself.
"""
@@ -69,7 +69,7 @@
"""Pushes the current local branch to a ref in the try repo.
The try repo is either the remote called 'try', or 'origin' otherwise.
- The ref is '/refs/try/<username>/<local branch>-<short hash>.
+ The ref is '/refs/tryjobs/<username>/<local branch>-<short hash>.
Returns the ref to which the local branch was pushed."""
username = RunGit('config', '--get', 'user.email').split('@', 1)[0]
@@ -80,7 +80,7 @@
DieWithError('Unable to get necessary git configuration.')
remote = 'try' if 'try' in remotes else 'origin'
- ref = 'refs/try/%s/%s-%s' % (username, branch, commit)
+ ref = 'refs/tryjobs/%s/%s-%s' % (username, branch, commit)
RunGit('push', remote, '%s:%s' % (branch, ref))
return ref
@@ -122,8 +122,10 @@
def Main(_argv):
"""Main entry point."""
+ # Sanity check.
EnsureInGitRepo()
+ # Get some settings.
settings = GetCodeReviewSettings()
server = settings.get('TRYSERVER_HTTP_HOST')
project = settings.get('TRYSERVER_PROJECT')
@@ -131,6 +133,7 @@
if not all((server, project, jobnames)):
DieWithError('Missing configuration in codereview.settings.')
+ # Do the heavy lifting.
ref = PushBranch()
for jobname in jobnames.split(','):
job = MakeJob(project, jobname, ref)