NO BUG - Vendor latest robustcheckout extension; r=sheehan
authorGregory Szorc <gps@mozilla.com>
Thu, 06 Dec 2018 10:34:12 -0500
changeset 508742 1f4e4f457d35c1579c5ea6669a8432de2469cc72
parent 508741 ec57d6145de761043cb3dadb2a2eac4df951665e
child 508743 2aa7b7e89e14a703b8e19cad8cb93b5e8ab3cac3
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssheehan
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
NO BUG - Vendor latest robustcheckout extension; r=sheehan Corresponds to revision 53c65bf08e17bc943a52e464f72a51a8ea5809e5 from version-control-tools repository.
testing/mozharness/external_tools/robustcheckout.py
--- a/testing/mozharness/external_tools/robustcheckout.py
+++ b/testing/mozharness/external_tools/robustcheckout.py
@@ -296,25 +296,25 @@ def robustcheckout(ui, url, dest, upstre
                 name += '_rmstore'
             if 'remove-wdir' in behaviors:
                 name += '_rmwdir'
 
             optimes.append((name, overall))
 
         # We break out overall operations primarily by their network interaction
         # We have variants within for working directory operations.
-        if 'clone' in behaviors:
+        if 'clone' in behaviors and 'create-store' in behaviors:
             record_op('overall_clone')
 
             if 'sparse-update' in behaviors:
                 record_op('overall_clone_sparsecheckout')
             else:
                 record_op('overall_clone_fullcheckout')
 
-        elif 'pull' in behaviors:
+        elif 'pull' in behaviors or 'clone' in behaviors:
             record_op('overall_pull')
 
             if 'sparse-update' in behaviors:
                 record_op('overall_pull_sparsecheckout')
             else:
                 record_op('overall_pull_fullcheckout')
 
             if 'empty-wdir' in behaviors:
@@ -604,16 +604,19 @@ def _docheckout(ui, url, dest, upstream,
             makedirs = util.makedirs
 
         makedirs(os.path.dirname(destvfs.base), notindexed=True)
         makedirs(sharebase, notindexed=True)
 
         if upstream:
             ui.write('(cloning from upstream repo %s)\n' % upstream)
 
+        if not storevfs.exists():
+            behaviors.add('create-store')
+
         try:
             with timeit('clone', 'clone'):
                 shareopts = {'pool': sharebase, 'mode': 'identity'}
                 res = hg.clone(ui, {}, clonepeer, dest=dest, update=False,
                                shareopts=shareopts)
         except (error.Abort, ssl.SSLError, urllib2.URLError) as e:
             if handlepullerror(e):
                 return callself()
@@ -781,39 +784,16 @@ def _docheckout(ui, url, dest, upstream,
     behavior = 'update-sparse' if sparse_profile else 'update'
 
     with timeit(op, behavior):
         if commands.update(ui, repo, rev=checkoutrevision, clean=True):
             raise error.Abort('error updating')
 
     ui.write('updated to %s\n' % checkoutrevision)
 
-    # HACK workaround https://bz.mercurial-scm.org/show_bug.cgi?id=5905
-    # and https://bugzilla.mozilla.org/show_bug.cgi?id=1462323.
-    #
-    # hg.mozilla.org's load balancer may route requests to different origin
-    # servers, thus exposing inconsistent state of repositories to the peer.
-    # This confuses Mercurial into promoting draft changesets to public. And
-    # this confuses various processes that rely on changeset phases being
-    # accurate.
-    #
-    # Our hack is to verify that changesets on non-publishing repositories are
-    # draft and to nuke the repo if they are wrong. We only apply this hack to
-    # the Try repo because it is the only repo where we can safely assume
-    # that the requested revision must be draft. This is because CI is triggered
-    # from special changesets that when pushed are always heads. And since the
-    # repo is non-publishing, these changesets should never be public.
-    if url in ('https://hg.mozilla.org/try',
-               'https://hg.mozilla.org/try-comm-central'):
-        if repo[checkoutrevision].phase() == phases.public:
-            ui.write(_('error: phase of revision is public; this is likely '
-                       'a manifestation of bug 1462323; the task will be '
-                       'retried\n'))
-            return EXIT_PURGE_CACHE
-
     return None
 
 
 def extsetup(ui):
     # Ensure required extensions are loaded.
     for ext in ('purge', 'share'):
         try:
             extensions.find(ext)