Bug 1305485 - use robustcheckout with ephemeral storage (tc windows); r=gps draft
authorRob Thijssen <rthijssen@mozilla.com>
Wed, 12 Oct 2016 16:06:17 +0100
changeset 424335 cc0aa7c7f31dced8a7b42732eab6b69ce4f6fbdf
parent 424323 26f2e65163e9f3cfab071a9823293217b1e1de8d
child 533645 9968dbc5cde499ba1cb3d333f4f527170568dfa1
push id32123
push userrthijssen@mozilla.com
push dateWed, 12 Oct 2016 15:16:25 +0000
reviewersgps
bugs1305485
milestone52.0a1
Bug 1305485 - use robustcheckout with ephemeral storage (tc windows); r=gps MozReview-Commit-ID: 1jatmsVJsDM
taskcluster/taskgraph/transforms/job/mozharness.py
--- a/taskcluster/taskgraph/transforms/job/mozharness.py
+++ b/taskcluster/taskgraph/transforms/job/mozharness.py
@@ -206,15 +206,22 @@ def mozharness_on_windows(config, job, t
     mh_command = [r'c:\mozilla-build\python\python.exe']
     mh_command.append('\\'.join([r'.\build\src\testing', run['script'].replace('/', '\\')]))
     for cfg in run['config']:
         mh_command.append('--config ' + cfg.replace('/', '\\'))
     mh_command.append('--branch ' + config.params['project'])
     mh_command.append(r'--skip-buildbot-actions --work-dir %cd:Z:=z:%\build')
     for option in run.get('options', []):
         mh_command.append('--' + option)
-    hg = r'c:\Program Files\Mercurial\hg.exe'
+
+    hg_command = ['"c:\\Program Files\\Mercurial\\hg.exe"']
+    hg_command.append('robustcheckout')
+    hg_command.extend(['--sharebase', 'y:\\hg-shared'])
+    hg_command.append('--purge')
+    hg_command.extend(['--upstream', 'https://hg.mozilla.org/mozilla-unified'])
+    hg_command.extend(['--revision', env['GECKO_HEAD_REV']])
+    hg_command.append(env['GECKO_HEAD_REPOSITORY'])
+    hg_command.append('.\\build\\src')
+
     worker['command'] = [
-        r'mkdir .\build\src',
-        r'"{}" share c:\builds\hg-shared\mozilla-central .\build\src'.format(hg),
-        r'"{}" pull -u -R .\build\src --rev %GECKO_HEAD_REV% %GECKO_HEAD_REPOSITORY%'.format(hg),
-        ' '.join(mh_command),
+        ' '.join(hg_command),
+        ' '.join(mh_command)
     ]