Bug 1334167: calculate head revision with -r .; r=Callek a=lizzard DONTBUILD
authorDustin J. Mitchell <dustin@mozilla.com>
Tue, 31 Jan 2017 18:28:06 +0000
changeset 376333 35dc8d0893ab55ff84513d74466be2eebc602a58
parent 376332 fd856899995a8f67c2acf572f571961685157ace
child 376334 7701daa9bb277f3fd78cda87e18d7632fbd88716
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersCallek, lizzard
bugs1334167
milestone53.0a2
Bug 1334167: calculate head revision with -r .; r=Callek a=lizzard DONTBUILD 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}'])