Bug 1334167: calculate head revision with -r .; r?Callek
MozReview-Commit-ID: 6tmdO5qwD4g
--- 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}'])