Mercurial > public > mercurial-scm > hg
comparison contrib/automation/hgautomation/windows.py @ 48843:d953a42b157d
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
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sat, 19 Feb 2022 18:04:49 -0700 |
parents | fc1ba19ec4a0 |
children | d7e064d509a0 |
comparison
equal
deleted
inserted
replaced
48842:649ff7f86f96 | 48843:d953a42b157d |
---|---|
259 env['HGENCODING'] = 'utf-8' | 259 env['HGENCODING'] = 'utf-8' |
260 | 260 |
261 hg_bin = hg_repo / 'hg' | 261 hg_bin = hg_repo / 'hg' |
262 | 262 |
263 res = subprocess.run( | 263 res = subprocess.run( |
264 ['python2.7', str(hg_bin), 'log', '-r', revision, '-T', '{node}'], | 264 ['python3', str(hg_bin), 'log', '-r', revision, '-T', '{node}'], |
265 cwd=str(hg_repo), | 265 cwd=str(hg_repo), |
266 env=env, | 266 env=env, |
267 check=True, | 267 check=True, |
268 capture_output=True, | 268 capture_output=True, |
269 ) | 269 ) |
270 | 270 |
271 full_revision = res.stdout.decode('ascii') | 271 full_revision = res.stdout.decode('ascii') |
272 | 272 |
273 args = [ | 273 args = [ |
274 'python2.7', | 274 'python3', |
275 hg_bin, | 275 hg_bin, |
276 '--config', | 276 '--config', |
277 'ui.ssh=ssh -F %s' % ssh_config, | 277 'ui.ssh=ssh -F %s' % ssh_config, |
278 '--config', | 278 '--config', |
279 'ui.remotecmd=c:/hgdev/venv-bootstrap/Scripts/hg.exe', | 279 'ui.remotecmd=c:/hgdev/venv-bootstrap/Scripts/hg.exe', |