Augie Fackler <augie@google.com> [Mon, 12 Feb 2018 10:21:44 -0500] rev 36093
bdiff: add to clang-format oversight
This file didn't require any complex fixes, so we may as well enable
clang-format while I'm editing it.
Differential Revision: https://phab.mercurial-scm.org/D2177
Matt Harbison <matt_harbison@yahoo.com> [Sun, 11 Feb 2018 20:59:35 -0500] rev 36092
test-merge-tools: stabilize for Windows
This masks the Windows argument parsing insanity[1], so it needs a bit of
explanation. (The security reference in the footnote is probably useful to keep
in mind if we ever whitelist certain in-repo config settings.)
9037c29e9f53 introduced tests that were failing on Windows with an unbalanced
double quote[2]. What ends up happening here is util.shellquote() is double
quoting the file path, but the shell script is placing this ->": "<- right next
to it. So cmd.exe gets launched with 'lb:base": ""c:\...\f~base.xyz"', which
got interpreted as 'lb:base: "c:\...\f~base.xyz'. If the test is adjusted to
quote like "lb:$labelbase: $base", then MSYS runs interference and strips the
'\' characters. I was able to get the expected result by dropping the quotes
from '": "', and changing the space to underscore. But since we need to glob
away the C: part anyway, just glob away the quote and leave the test unchanged.
[1] https://blogs.msdn.microsoft.com/twistylittlepassagesallalike/2011/04/23/everyone-quotes-command-line-arguments-the-wrong-way/
[2] https://buildbot.mercurial-scm.org/builders/Win7%20x86_64%20hg%20tests/builds/441/steps/run-tests.py%20%28python%202.7.13%29/logs/stdio
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 11 Feb 2018 17:17:05 +0530] rev 36091
py3: replace file() with open() in test-convert-hg-source.t
file() is not present in Python 3.
It also makes sure we read and write in bytes mode on Python 3.
Differential Revision: https://phab.mercurial-scm.org/D2132
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 11 Feb 2018 17:15:45 +0530] rev 36090
py3: replace file() with open() in test-encoding-align.t
file() is not present in Python 3.
This patch also makes sure we write bytes in Python 3.
Differential Revision: https://phab.mercurial-scm.org/D2131
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 11 Feb 2018 17:14:59 +0530] rev 36089
py3: replace file() with open() in test-encoding.t
file() is not present in Python 3.
This also makes sure we write things in bytes mode in Python 3.
Differential Revision: https://phab.mercurial-scm.org/D2130
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 11 Feb 2018 16:17:17 +0530] rev 36088
py3: make sure we return str from __repr__
Differential Revision: https://phab.mercurial-scm.org/D2109
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Feb 2018 14:30:44 -0800] rev 36087
py3: check for bytes instead of str in hg.share()
Differential Revision: https://phab.mercurial-scm.org/D2151
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Feb 2018 14:29:30 -0800] rev 36086
py3: port metaedit extension to Python 3
Without these changes, this extension is responsible for a test of
test failures.
Differential Revision: https://phab.mercurial-scm.org/D2150
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Feb 2018 14:25:10 -0800] rev 36085
py3: pass system string to email.message.Message.set_type()
Python 3 insists the type is a str.
Differential Revision: https://phab.mercurial-scm.org/D2149
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Feb 2018 14:18:27 -0800] rev 36084
py3: open temporary file in binary mode
Otherwise things fail later when we write bytes to the handle.
Differential Revision: https://phab.mercurial-scm.org/D2148