Bug 1505579 - Upgrade to latest robustcheckout; r=sheehan
☠☠ backed out by 09be3daa0787 ☠ ☠
authorGregory Szorc <gps@mozilla.com>
Thu, 08 Nov 2018 23:25:05 +0000
changeset 446457 b0805a8cf6eb120525408dd486ca2c362afb2db3
parent 446456 565215cf2e5e42034860257f4ea4b5d0b0adf75d
child 446458 a438eff7d106f25a951c690c22f30b37d40d54a6
push id35041
push useraiakab@mozilla.com
push dateThu, 15 Nov 2018 09:52:43 +0000
treeherdermozilla-central@48720735b142 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssheehan
bugs1505579
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1505579 - Upgrade to latest robustcheckout; r=sheehan Vendored robustcheckout extension from the version-control-tools repository revision d78e5c52a0228c3dc8ed03fe43bf749c8e68bd20 without modifications. This is needed to support Mercurial 4.8. Differential Revision: https://phabricator.services.mozilla.com/D11398
testing/mozharness/external_tools/robustcheckout.py
--- a/testing/mozharness/external_tools/robustcheckout.py
+++ b/testing/mozharness/external_tools/robustcheckout.py
@@ -44,18 +44,18 @@ try:
     from mercurial import configitems
     configitems.dynamicdefault
 except ImportError:
     configitems = None
 
 # Causes worker to purge caches on process exit and for task to retry.
 EXIT_PURGE_CACHE = 72
 
-testedwith = '3.7 3.8 3.9 4.0 4.1 4.2 4.3 4.4 4.5 4.6 4.7'
-minimumhgversion = '3.7'
+testedwith = '4.3 4.4 4.5 4.6 4.7 4.8'
+minimumhgversion = '4.3'
 
 cmdtable = {}
 
 # TRACKING hg43 Mercurial 4.3 introduced registrar.command as a replacement for
 # cmdutil.command.
 if util.safehasattr(registrar, 'command'):
     command = registrar.command(cmdtable)
 else:
@@ -83,23 +83,19 @@ def getvfs():
 
 def getsparse():
     from mercurial import sparse
     return sparse
 
 
 def supported_hg():
     '''Returns True if the Mercurial version is supported for robustcheckout'''
-    return util.versiontuple(n=2) in (
-        (4, 3),
-        (4, 4),
-        (4, 5),
-        (4, 6),
-        (4, 7),
-    )
+    return '.'.join(
+        str(v) for v in util.versiontuple(n=2)
+    ) in testedwith.split()
 
 
 if os.name == 'nt':
     import ctypes
 
     # Get a reference to the DeleteFileW function
     # DeleteFileW accepts filenames encoded as a null terminated sequence of
     # wide chars (UTF-16). Python's ctypes.c_wchar_p correctly encodes unicode
@@ -675,17 +671,22 @@ def _docheckout(ui, url, dest, upstream,
         # By default, Mercurial will ignore unknown sparse profiles. This could
         # lead to a full checkout. Be more strict.
         try:
             repo.filectx(sparse_profile, changeid=checkoutrevision).data()
         except error.ManifestLookupError:
             raise error.Abort('sparse profile %s does not exist at revision '
                               '%s' % (sparse_profile, checkoutrevision))
 
-        old_config = sparsemod.parseconfig(repo.ui, repo.vfs.tryread('sparse'))
+        # TRACKING hg48 - parseconfig takes `action` param
+        if util.versiontuple(n=2) >= (4, 8):
+            old_config = sparsemod.parseconfig(repo.ui, repo.vfs.tryread('sparse'), 'sparse')
+        else:
+            old_config = sparsemod.parseconfig(repo.ui, repo.vfs.tryread('sparse'))
+
         old_includes, old_excludes, old_profiles = old_config
 
         if old_profiles == {sparse_profile} and not old_includes and not \
                 old_excludes:
             ui.write('(sparse profile %s already set; no need to update '
                      'sparse config)\n' % sparse_profile)
         else:
             if old_includes or old_excludes or old_profiles: