Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Unified Diff: trychange_git.py

Issue 23452051: Tiny updates to trychange_git. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/chromium-jobqueue.git@master
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698