Joerg Sonnenberger <joerg@bec.de> [Tue, 12 Feb 2019 19:08:17 +0100] rev 41840
server: allow customizing the default repo filter
hgweb has the (undocument) configuration option web.view that allows
restricting visible revisions to immutable. This is useful for serving
the same storage as publishing and non-publishing repo. Add the new
server.view option to serve the same purpose by changing the default
behavior of `getdispatchrepo`. Drop the hard-coded 'served' filter in the
batch handler of v1 of the wire proto, this is a left-over from the days
before `getdispatchrepo` existed.
Differential Revision: https://phab.mercurial-scm.org/D5946
Pulkit Goyal <pulkit@yandex-team.ru> [Sat, 02 Mar 2019 05:24:35 +0530] rev 41839
py3: convert filtername to str if it's None
I have not called pycompat.bytestr() and rather converted the value there
because I am starting to get concerned about the function call overhead of all
this bytes to str or vice versa convert functions.
Differential Revision: https://phab.mercurial-scm.org/D6042
Martin von Zweigbergk <martinvonz@google.com> [Sat, 02 Mar 2019 13:28:17 -0800] rev 41838
walkfilerevs: rename filerevgen() to filerevs() since it's not a generator
Differential Revision: https://phab.mercurial-scm.org/D6053
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 02 Mar 2019 13:15:53 -0800] rev 41837
global: use raw string for setlocale() argument
Otherwise Python 2 will coerce a unicode to str, which fails
on HGUNICODEPEDANTRY=1.
Differential Revision: https://phab.mercurial-scm.org/D6052
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 02 Mar 2019 13:07:58 -0800] rev 41836
encoding: use raw strings for encoding arguments
This prevents the internals of Python from coercing a unicode to str
on Python 2 and makes tests run with HGUNICODEPEDANTRY=1 a lot
happier.
Differential Revision: https://phab.mercurial-scm.org/D6051
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 02 Mar 2019 13:02:39 -0800] rev 41835
revsetlang: use sysbytes() instead of blind encode()
Otherwise we will call str.encode() on Python 2, which is wrong.
sysbytes() does encode('utf-8') on Python 3. But the source is
guaranteed ASCII, so it shouldn't matter.
With this change, `hg` now runs with `HGUNICODEPEDANTRY=1` set.
However, several tests are failing.
Differential Revision: https://phab.mercurial-scm.org/D6050
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 02 Mar 2019 12:57:00 -0800] rev 41834
global: use raw strings for namedtuple()
Otherwise Python 2 will attempt to coerce unicode to str, which
we don't want.
Differential Revision: https://phab.mercurial-scm.org/D6049
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 02 Mar 2019 12:55:29 -0800] rev 41833
attr: don't attempt to .encode() a str on Python 2
Otherwise it coerces automatically.
Differential Revision: https://phab.mercurial-scm.org/D6048