# HG changeset patch # User Gregory Szorc # Date 2022-02-20 01:04:49 # Node ID d953a42b157d099f90c4fa9f615f6bb32447f3ad # Parent 649ff7f86f96cb47417b2e3c3fae4fd7953c3d49 automation: run hg with python3 Python 2.7 support will go away soon. Let's use Python 3 as part of the automation. Differential Revision: https://phab.mercurial-scm.org/D12260 diff --git a/contrib/automation/hgautomation/linux.py b/contrib/automation/hgautomation/linux.py --- a/contrib/automation/hgautomation/linux.py +++ b/contrib/automation/hgautomation/linux.py @@ -532,7 +532,7 @@ def synchronize_hg( hg_bin = source_path / 'hg' res = subprocess.run( - ['python2.7', str(hg_bin), 'log', '-r', revision, '-T', '{node}'], + ['python3', str(hg_bin), 'log', '-r', revision, '-T', '{node}'], cwd=str(source_path), env=env, check=True, @@ -542,7 +542,7 @@ def synchronize_hg( full_revision = res.stdout.decode('ascii') args = [ - 'python2.7', + 'python3', str(hg_bin), '--config', 'ui.ssh=ssh -F %s' % ssh_config, diff --git a/contrib/automation/hgautomation/windows.py b/contrib/automation/hgautomation/windows.py --- a/contrib/automation/hgautomation/windows.py +++ b/contrib/automation/hgautomation/windows.py @@ -261,7 +261,7 @@ def synchronize_hg(hg_repo: pathlib.Path hg_bin = hg_repo / 'hg' res = subprocess.run( - ['python2.7', str(hg_bin), 'log', '-r', revision, '-T', '{node}'], + ['python3', str(hg_bin), 'log', '-r', revision, '-T', '{node}'], cwd=str(hg_repo), env=env, check=True, @@ -271,7 +271,7 @@ def synchronize_hg(hg_repo: pathlib.Path full_revision = res.stdout.decode('ascii') args = [ - 'python2.7', + 'python3', hg_bin, '--config', 'ui.ssh=ssh -F %s' % ssh_config,