Bug 1334167: calculate head revision with -r .; r?Callek draft
authorDustin J. Mitchell <dustin@mozilla.com>
Tue, 31 Jan 2017 18:28:06 +0000
changeset 469652 6f6c2c0b2a3e1bdb0bd94bc7ff6c4967153f16b2
parent 469651 95fe30082f2c014c9d9878109c8ff419429029c5
child 469653 c94a2a2fa6fbbd12f334d93cc7bf1d856f77f608
push id43793
push userdmitchell@mozilla.com
push dateThu, 02 Feb 2017 14:41:57 +0000
reviewersCallek
bugs1334167
milestone54.0a1
Bug 1334167: calculate head revision with -r .; r?Callek MozReview-Commit-ID: 6tmdO5qwD4g
taskcluster/taskgraph/cron/util.py
--- a/taskcluster/taskgraph/cron/util.py
+++ b/taskcluster/taskgraph/cron/util.py
@@ -21,9 +21,12 @@ def match_utc(params, hour=None, minute=
     if hour and params['time'].hour != hour:
         return False
     if minute and params['time'].minute != minute:
         return False
     return True
 
 
 def calculate_head_rev(options):
-    return subprocess.check_output(['hg', 'log', '-r', options['head_ref'], '-T', '{node}'])
+    # we assume that run-task has correctly checked out the revision indicated by
+    # GECKO_HEAD_REF, so all that remains is to see what the current revision is.
+    # Mercurial refers to that as `.`.
+    return subprocess.check_output(['hg', 'log', '-r', '.', '-T', '{node}'])