Mercurial > public > mercurial-scm > hg-stable
comparison contrib/automation/hgautomation/linux.py @ 48934: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 | 0de5eefbe4b2 |
children | 5c8148cd7f13 |
comparison
equal
deleted
inserted
replaced
48933:649ff7f86f96 | 48934:d953a42b157d |
---|---|
530 env['HGENCODING'] = 'utf-8' | 530 env['HGENCODING'] = 'utf-8' |
531 | 531 |
532 hg_bin = source_path / 'hg' | 532 hg_bin = source_path / 'hg' |
533 | 533 |
534 res = subprocess.run( | 534 res = subprocess.run( |
535 ['python2.7', str(hg_bin), 'log', '-r', revision, '-T', '{node}'], | 535 ['python3', str(hg_bin), 'log', '-r', revision, '-T', '{node}'], |
536 cwd=str(source_path), | 536 cwd=str(source_path), |
537 env=env, | 537 env=env, |
538 check=True, | 538 check=True, |
539 capture_output=True, | 539 capture_output=True, |
540 ) | 540 ) |
541 | 541 |
542 full_revision = res.stdout.decode('ascii') | 542 full_revision = res.stdout.decode('ascii') |
543 | 543 |
544 args = [ | 544 args = [ |
545 'python2.7', | 545 'python3', |
546 str(hg_bin), | 546 str(hg_bin), |
547 '--config', | 547 '--config', |
548 'ui.ssh=ssh -F %s' % ssh_config, | 548 'ui.ssh=ssh -F %s' % ssh_config, |
549 '--config', | 549 '--config', |
550 'ui.remotecmd=/hgdev/venv-bootstrap/bin/hg', | 550 'ui.remotecmd=/hgdev/venv-bootstrap/bin/hg', |