Add ref parameter when creating a try job
This fixes git cl try when revision is passed.
R=ehmaldonado@chromium.org
Bug: 1138785
Change-Id: Id5a067114426ed55409b1f200abf4d5a38fdbaa5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2691312
Auto-Submit: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
diff --git a/git_cl.py b/git_cl.py
index 6e7e148..c02d23e 100755
--- a/git_cl.py
+++ b/git_cl.py
@@ -392,10 +392,12 @@
})
if options.ensure_value('revision', None):
+ remote, remote_branch = changelist.GetRemoteBranch()
requests[-1]['scheduleBuild']['gitilesCommit'] = {
'host': gerrit_changes[0]['host'],
'project': gerrit_changes[0]['project'],
- 'id': options.revision
+ 'id': options.revision,
+ 'ref': GetTargetRef(remote, remote_branch, None)
}
return requests