From patchwork Mon Feb 4 23:37:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D5825: run-tests: use raw strings for regular expressions From: phabricator X-Patchwork-Id: 38410 Message-Id: <65c4ddefcca97024561687952c267232@localhost.localdomain> To: mercurial-devel@mercurial-scm.org Date: Mon, 4 Feb 2019 23:37:32 +0000 This revision was automatically updated to reflect the committed changes. Closed by commit rHG17a6e063c886: run-tests: use raw strings for regular expressions (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D5825?vs=13752&id=13784 REVISION DETAIL https://phab.mercurial-scm.org/D5825 AFFECTED FILES tests/run-tests.py CHANGE DETAILS To: indygreg, #hg-reviewers Cc: mercurial-devel diff --git a/tests/run-tests.py b/tests/run-tests.py --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -634,7 +634,7 @@ # list in group 2, and the preceeding line output in group 1: # # output..output (feature !)\n -optline = re.compile(b'(.*) \((.+?) !\)\n$') +optline = re.compile(br'(.*) \((.+?) !\)\n$') def cdatasafe(data): """Make a string safe to include in a CDATA block. @@ -3112,8 +3112,8 @@ # installation layout put it in bin/ directly. Fix it with open(hgbat, 'rb') as f: data = f.read() - if b'"%~dp0..\python" "%~dp0hg" %*' in data: - data = data.replace(b'"%~dp0..\python" "%~dp0hg" %*', + if br'"%~dp0..\python" "%~dp0hg" %*' in data: + data = data.replace(br'"%~dp0..\python" "%~dp0hg" %*', b'"%~dp0python" "%~dp0hg" %*') with open(hgbat, 'wb') as f: f.write(data)