Gregory Szorc <gregory.szorc@gmail.com> [Sat, 24 Feb 2018 10:56:15 -0800] rev 36403
histedit: rename variables so they have "ctx" in them
It is convention for context instances to end with "ctx." Until
we have type annotations, this makes auditing much, much easier.
Differential Revision: https://phab.mercurial-scm.org/D2425
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 24 Feb 2018 10:51:13 -0800] rev 36402
cmdutil: use ctx.rev() instead of int(ctx)
Continuing to wean off basectx.__int__.
Differential Revision: https://phab.mercurial-scm.org/D2424
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 24 Feb 2018 10:48:24 -0800] rev 36401
templatekw: use ctx.rev() instead of casting context to int
basectx has __int__ implemented. Per mailing list discussion
with Yuya, we don't like having this implemented because it is
too much magic and in some cases rev() will return None, which
isn't an int.
So convert a `'%d' % ctx` to ctx.rev() instead.
Differential Revision: https://phab.mercurial-scm.org/D2423
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 24 Feb 2018 16:18:40 +0530] rev 36400
py3: fix handling of keyword arguments at more places
The keys of keyword arguments of Python 3 should be str, which is why we need to
prevent getting the b'' prefix added by the transformer or convert keys to str
using pycompat.strkwargs()
Differential Revision: https://phab.mercurial-scm.org/D2420
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 24 Feb 2018 16:16:14 +0530] rev 36399
py3: use '%d' for integers instead of '%s'
Differential Revision: https://phab.mercurial-scm.org/D2419
Kevin Bullock <kbullock+mercurial@ringworld.org> [Sat, 24 Feb 2018 17:49:10 -0600] rev 36398
merge with stable
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 24 Feb 2018 16:20:55 +0530] rev 36397
py3: use '//' for integer division in hgweb/common.py
'/' on Python 3 does the float division.
Differential Revision: https://phab.mercurial-scm.org/D2422
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 24 Feb 2018 16:20:15 +0530] rev 36396
py3: use util.forcebytestr to convert error messages to bytes
Differential Revision: https://phab.mercurial-scm.org/D2421
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 24 Feb 2018 16:15:16 +0530] rev 36395
py3: add b'' prefixes to config options in test/badserverext.py
Differential Revision: https://phab.mercurial-scm.org/D2418
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 24 Feb 2018 16:07:45 +0530] rev 36394
py3: replace file() with open()
file() is not present in Python 3.
Differential Revision: https://phab.mercurial-scm.org/D2417
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 24 Feb 2018 16:06:21 +0530] rev 36393
py3: make sure regexes are bytes
# skip-blame because we added just b'' prefix
Differential Revision: https://phab.mercurial-scm.org/D2416
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 24 Feb 2018 16:04:57 +0530] rev 36392
py3: convert dict.items() to list explicitly
On python 3, dict.items() returns a dict_items object which cannot be sorted.
Differential Revision: https://phab.mercurial-scm.org/D2415
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 24 Feb 2018 15:35:00 +0530] rev 36391
py3: whitelist another 8 passing tests
Differential Revision: https://phab.mercurial-scm.org/D2414
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 24 Feb 2018 01:22:15 +0530] rev 36390
py3: use '//' for integer divisions
Differential Revision: https://phab.mercurial-scm.org/D2413
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 24 Feb 2018 01:21:22 +0530] rev 36389
py3: use "%d" for integers instead of "%s"
util.parsedate() returns a tuple of integers. Writing this patch, I wish we had
some type hinting.
Differential Revision: https://phab.mercurial-scm.org/D2412
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 24 Feb 2018 01:20:20 +0530] rev 36388
py3: use util.forcebytestr instead of str to convert error messages
Differential Revision: https://phab.mercurial-scm.org/D2411
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 24 Feb 2018 01:19:26 +0530] rev 36387
py3: use pycompat.byteskwargs() to fix keyword arguments handling
I missed these when I fixed keyword arguments handling in the whole file.
Differential Revision: https://phab.mercurial-scm.org/D2410
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 23 Feb 2018 17:57:04 -0800] rev 36386
setup: only allow Python 3 from a source checkout (
issue5804)
People are running `pip install Mercurial` with Python 3 and that
is working because not everything performs a Python version
compatibility check.
Modern versions of pip do recognize the "python_requires" keyword
(https://packaging.python.org/tutorials/distributing-packages/#python-requires)
which we set if using setuptools. But this isn't set nor recognized
everywhere.
To prevent people from accidentally installing Mercurial with Python
3 until Python 3 is officially supported, have setup.py fail when
run with Python 3. But don't fail if we're running from a source
checkout, as we don't want to anger Mercurial developers hacking
on Python 3 nor Mercurial's test automation running from source
checkouts. People running setup.py from source checkouts could still
fall through a Python 3 crack. But at least the
`pip install Mercurial` attempt will get nipped in the bud.
Matt Harbison <matt_harbison@yahoo.com> [Fri, 23 Feb 2018 20:50:10 -0500] rev 36385
tests: add HTTP POST and PUT support to the $LOGDATE$ substitution
The lfs serving code uses both POST and PUT requests (and there's existing
support for POST).
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 23 Feb 2018 18:47:26 +0530] rev 36384
py3: make regex bytes in hgweb/webcommands.py
# skip-blame because just b'' prefix
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 23 Feb 2018 18:23:51 +0530] rev 36383
py3: replace types.NoneType with type(None)
types.NoneType is not present in Python 3.
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 23 Feb 2018 18:12:20 +0530] rev 36382
py3: add missing b'' in test-arbitraryfilectx.t
# skip-blame as just b'' prefix
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 23 Feb 2018 18:04:33 +0530] rev 36381
py3: pass ctx.rev() instead of ctx in range()
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 23 Feb 2018 18:03:58 +0530] rev 36380
py3: add b'' prefixes in test-alias.t
# skip-blame as it's just b'' prefixes
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 23 Feb 2018 17:26:45 +0530] rev 36379
py3: add b'' prefixes in test-revset.t
# skip-blame because it's just b''
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 23 Feb 2018 17:25:51 +0530] rev 36378
py3: make sure we use bytes in generate-working-copy-states.py
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 23 Feb 2018 17:15:36 +0530] rev 36377
py3: fix keyword arguments handling in hgext/acl.py
# skip-blame because we added r'' prefixes
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 23 Feb 2018 17:14:25 +0530] rev 36376
py3: use pycompat.bytestr to convert str returned by getpass.getuser to bytes
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 23 Feb 2018 16:57:17 +0530] rev 36375
py3: add b'' prefixes in test-abort-checkin.t
# skip-blame because we just added a b'' prefix.
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 21 Feb 2018 23:43:23 +0530] rev 36374
py3: add b'' prefixes in test-dispatch.py
# skip-blame because this is just adding b'' prefixes
Augie Fackler <augie@google.com> [Thu, 22 Feb 2018 20:04:42 -0500] rev 36373
cleanup: say goodbye to manifestv2 format
This experiment was a bust: we'd hoped for smaller repository sizes,
but things got larger. Google ended up rolling out tree manifests in a
format that's compatible with the original manifest format, and I
believe Facebook is doing the same. This code was never implemented as
native speedups, so I'm pretty comfortable saying nobody is using the
experimental feature. Let's rip it out.
I noticed this code still kicking around because I was investigating a
repo corruption issue for timeless.
.. bc::
Support for the experimental manifestv2 format has been removed, as
it was never completed and failed to meet expectations.
Differential Revision: https://phab.mercurial-scm.org/D2393
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 21 Feb 2018 16:47:39 -0800] rev 36372
wireproto: document the wonky push protocol for SSH
It took me several minutes to figure out how the "unbundle"
protocol worked. It turns out that the SSH protocol handler
sends an empty reply that is interpreted as "OK to send" and
only then does the client send the bundle payload.
On top of that, the response is different depending on whether
the operation was successful or not. I nearly pulled out my hair
deciphering this.
Differential Revision: https://phab.mercurial-scm.org/D2385