Index: trychange_git.py |
diff --git a/trychange_git.py b/trychange_git.py |
index 28f708b168aabf9b9cbab96169c3322ff1afc3ef..db324762777d8362b2648bd3c2d9bc6b98c58e7f 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 @@ def PushBranch(): |
"""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 @@ def PushBranch(): |
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 PostJob(server, project, job): |
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 @@ def Main(_argv): |
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) |