Pulkit Goyal <7895pulkit@gmail.com> [Sat, 23 Dec 2017 14:24:41 +0530] rev 36062
remotenames: add new namespaces for remotebookmarks and remotebranches
This patch adds two new namespaces which will be enabled by remotenames
extension. The namespaces are remotebookmarks and remotebranches. Adding them
as namespaces will show them in various commands' output such as log, show work.
This will also unable to access changesets using that name.
Tests are also added for the same.
This is a part of moving hgremotenames extension to core.
hgremotenames: https://bitbucket.org/seanfarley/hgremotenames
Differential Revision: https://phab.mercurial-scm.org/D1758
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 23 Dec 2017 17:50:42 +0530] rev 36061
remotenames: introduce a class to lazily resolve remotnames
remotenames may take time to load and in next patch we are going to introduce
namespaces related to them. So let's introduce a class making them load lazily.
This is a part of moving hgremotenames extension to core.
hgremotenames: https://bitbucket.org/seanfarley/hgremotenames
Differential Revision: https://phab.mercurial-scm.org/D1757
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 23 Dec 2017 00:19:09 +0530] rev 36060
remotenames: introduce class to encapsulate remotenames info in an extension
This patch adds a new extension remotenames in which features from hgremotenames
extension (https://bb/seanfarley/hgremotenames) will be added incrementally.
This patch introduces a basic class to encapsulate the remotenames information.
Differential Revision: https://phab.mercurial-scm.org/D1756
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 23 Dec 2017 20:27:41 +0530] rev 36059
logexchange: introduce helper function to get remote path name
This patch moves chunk of activepath function from hgremotenames extension
(https://bitbucket.org/seanfarley/hgremotenames/) to core. Before moving
rest of the part, there needs to be some refactoring done to schemes which
will be done as a separate series.
Differential Revision: https://phab.mercurial-scm.org/D1755
Augie Fackler <augie@google.com> [Mon, 12 Feb 2018 10:36:59 -0500] rev 36058
charencode: adjust clang-format enable/disable comments
We're pretty close to being able to let clang-format manage most of
these files.
Differential Revision: https://phab.mercurial-scm.org/D2180
Augie Fackler <augie@google.com> [Mon, 12 Feb 2018 10:31:17 -0500] rev 36057
diffhelpers: allow clang-format oversight
One trailing comma!
Differential Revision: https://phab.mercurial-scm.org/D2179
Augie Fackler <augie@google.com> [Mon, 12 Feb 2018 10:29:02 -0500] rev 36056
pathencode: allow clang-format oversight
Only had to add two trailing commas to make the file format acceptably!
Differential Revision: https://phab.mercurial-scm.org/D2178
Augie Fackler <augie@google.com> [Mon, 12 Feb 2018 10:21:44 -0500] rev 36055
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 36054
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 36053
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 36052
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 36051
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 36050
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 36049
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 36048
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 36047
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 36046
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
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Feb 2018 14:17:23 -0800] rev 36045
py3: use email parser that operates on bytes
email.parser.Parser() operates on str in both Python 2 and 3.
Python 3.2 introduced the email.parser.BytesParser(), which works
like Parser except it accepts bytes.
We implement the pycompat helper as a function so we lazily
import the "email" module.
Differential Revision: https://phab.mercurial-scm.org/D2147
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Feb 2018 13:32:18 -0800] rev 36044
py3: port ext-phase-report.py extension
The custom module importer doesn't run on Python files in the
tests directory. So we need the source to be compatible with
both Python 2 and 3.
Differential Revision: https://phab.mercurial-scm.org/D2145
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Feb 2018 13:23:26 -0800] rev 36043
py3: more robustly cast UUID to bytes
The UUID type only has __str__ implemented. So we need to cast to
bytes on Python 3.
We need an actual bytes instance here (bytestr won't do) because
the re.escape() later iterates over characters and characters
need to behave like ints, not bytes instances of length 1.
Differential Revision: https://phab.mercurial-scm.org/D2144
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Feb 2018 13:09:16 -0800] rev 36042
py3: use bytes() to cast context instances
__str__ and __bytes__ are both implemented on context types. However,
__str__ behaves differently on Python 2 and 3.
Differential Revision: https://phab.mercurial-scm.org/D2143
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Feb 2018 13:06:01 -0800] rev 36041
py3: convert __doc__ to bytes
Differential Revision: https://phab.mercurial-scm.org/D2142
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Feb 2018 14:21:44 -0800] rev 36040
py3: cast repr() result to bytes
Differential Revision: https://phab.mercurial-scm.org/D2141
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 11 Feb 2018 13:00:00 -0800] rev 36039
py3: fix file i/o in test-status.t
Use raw string literal for open() mode and pass the proper data
type to write().
Differential Revision: https://phab.mercurial-scm.org/D2140