generate-hg-s3-bundles: use tools virtualenv (bug 1354311); r?glob draft
authorGregory Szorc <gps@mozilla.com>
Thu, 06 Apr 2017 15:19:41 -0700
changeset 10728 8c2824d86b5b4500ab05a386fca5a50c99d274b2
parent 10727 eb24dbfa2361318387d241e881d85233027c4dae
push id1613
push userbmo:gps@mozilla.com
push dateFri, 07 Apr 2017 00:08:28 +0000
reviewersglob
bugs1354311
generate-hg-s3-bundles: use tools virtualenv (bug 1354311); r?glob In order to support zstd bundle generation before deploying Mercurial 4.1 on most server processes, we established an "hg_pre" virtualenv running 4.1 and used it for bundle generation. All virtualenvs are now 4.1.2. So we no longer need this workaround. I'm going to keep the hg_pre virtualenv around because I think there is value in having the ability to install a newer release of Mercurial so ad-hoc processes can have access to it. MozReview-Commit-ID: FD2m0dTxp6t
scripts/generate-hg-s3-bundles
--- a/scripts/generate-hg-s3-bundles
+++ b/scripts/generate-hg-s3-bundles
@@ -17,17 +17,16 @@ import time
 
 from boto.s3.connection import S3Connection
 import concurrent.futures as futures
 
 
 # Use a separate hg for bundle generation for zstd support until we roll
 # out Mercurial 4.1 everywhere.
 HG = '/var/hg/venv_tools/bin/hg'
-HG_BUNDLE = '/var/hg/venv_hg_pre/bin/hg'
 PUSH_REPO = '/var/hg/version-control-tools/scripts/push-repo.sh'
 
 # The types of bundles to generate.
 #
 # Define in order bundles should be listed in manifest.
 CREATES = [
     ('gzip-v2', ['bundle', '-a', '-t', 'gzip-v2'], {}),
     # ``zstd`` uses default compression settings and is reasonably fast.
@@ -171,17 +170,17 @@ def bundle_paths(root, repo, tag, typ):
     return final_path, remote_path
 
 def generate_bundle(repo, temp_path, final_path, extra_args):
     """Generate a single bundle from arguments.
 
     Generates using the command specified by ``extra_args`` into ``temp_path``
     before moving the fully created bundle to ``final_path``.
     """
-    args = [HG_BUNDLE,
+    args = [HG,
             '--config', 'extensions.vcsreplicator=!',
             '-R', repo] + extra_args + [temp_path]
     subprocess.check_call(args)
     os.rename(temp_path, final_path)
 
 
 def generate_bundles(repo, upload=True, copyfrom=None, zstd_max=False):
     """Generate bundle files for a repository at a path.