Georges Racinet <georges.racinet@octobus.net> [Mon, 04 Feb 2019 11:39:28 +0100] rev 41714
rust: less set lookups in AncestorsIterator
This uses the boolean return of `HashSet::insert()` to factor
pairs of contains()/insert() into a single insert()
On the mozilla-central repository (450k changesets), I get about a bit more
than 10% better medians in perfancestors (taking the mean of three runs)
Best run for parent changeset:
! wall 0.106474 comb 0.110000 user 0.110000 sys 0.000000 (median of 93)
Best run for this changeset:
! wall 0.093191 comb 0.090000 user 0.090000 sys 0.000000 (median of 100)
Differential Revision: https://phab.mercurial-scm.org/D5942
Pulkit Goyal <pulkit@yandex-team.ru> [Fri, 15 Feb 2019 17:36:57 +0300] rev 41713
obsutil: don't assume leftctx and rightctx repo as same
Backed out changeset
520514af2d93.
hgsubversion can pass leftctx and rightctx which are instances of two different
repositories. This was making tests fail on hgsubversion with 4.9.
The two different instances are:
(Pdb) p rightctx.repo()
<filteredrepo:served <hgsubversion.svnrepo.svnlocalrepo object at 0x
7fe29d296d10>>
(Pdb) p leftctx.repo()
<filteredrepo:visible <hgsubversion.svnrepo.svnlocalrepo object at 0x
7fe29d494590>>
Differential Revision: https://phab.mercurial-scm.org/D5968
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 15 Feb 2019 13:46:30 -0800] rev 41712
tests: add more wildcards to test-extdiff.t
The diff tool (which is `echo`) runs in the background and output
order can therefore be non-deterministic. We need to glob over
the file names to account for this.
Differential Revision: https://phab.mercurial-scm.org/D5976
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 15 Feb 2019 13:22:01 -0800] rev 41711
url: don't pass strict argument on Python 3
The argument was removed in Python 3.4.
Differential Revision: https://phab.mercurial-scm.org/D5975
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 15 Feb 2019 13:16:07 -0800] rev 41710
url: always use str for proxy configuration
Previously, proxies didn't work on Python 3 for various reasons.
First, the keys to the "proxies" dict are fed into a
`setattr(self, "%s_open", ...)` call and passing bytestrings
results in setting an oddly named attribute due to the b''
in %s formatting. This resulted in "http_open" and "https_open"
not being properly overridden and proxies not being used.
Second, the standard library was expecting proxy URLs to be
str. And various operations (including our custom code in
url.py) would fail to account for the str/bytes mismatch.
This commit normalizes everything to str and adjusts our
proxy code in url.py to account for the presence of str
on Python 3.
Differential Revision: https://phab.mercurial-scm.org/D5952
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 12 Feb 2019 14:29:56 -0800] rev 41709
py3: port tinyproxy.py to work with Python 3
There were various str/bytes mismatches in the code. This caused
the proxy server to misbehave at run-time. The manifestation
was typically premature socket disconnect from the perspective
of the client.
Differential Revision: https://phab.mercurial-scm.org/D5951
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 12 Feb 2019 12:13:56 -0800] rev 41708
url: always access req._tunnel_host
The getattr() was there to handle Python versions before 2.6, which
lacked this attribute.
We /might/ be able to further delete some code here. However, the
behavior here is extremely hard to follow because large parts of
this code duplicate code from the Python standard library and it
is difficult to understand what is actually needed.
Differential Revision: https://phab.mercurial-scm.org/D5950
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 15 Feb 2019 13:07:07 -0800] rev 41707
tests: double escape \ in test-import-eol.t and test-mq-eol.t
The shell eats the \\.
Differential Revision: https://phab.mercurial-scm.org/D5974
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 15 Feb 2019 13:05:01 -0800] rev 41706
tests: use raw string in test-impexp-branch.t
On first glance, the escaping of \s seems correct. However,
the shell eats the escape and we're left with '\s` in the
written file. Let's use a raw string so we don't have to
double escape.
Differential Revision: https://phab.mercurial-scm.org/D5973
Julien Cristau <jcristau@mozilla.com> [Mon, 11 Feb 2019 16:27:20 +0100] rev 41705
phabricator: make user searches case-insensitive
User names in conduit are case insensitive, but when looking for "FOO"
it would return "foo" instead and we'd think the user didn't exist. So
lower case both the query and the response when comparing them.
Differential Revision: https://phab.mercurial-scm.org/D5934
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 15 Feb 2019 11:31:17 -0800] rev 41704
exchange: raise error.Abort instead of ValueError
Raising ValueError results in an uncaught exception and a traceback
being printed. In the context of servers, it can result in an HTTP
500 and an exception being logged in the error log.
I don't think this is proper behavior.
The bundle2 code paths have a mechanism for translating an
error.Abort into an error message reported to the clients. I
think we should use that instead.
This commit replaces some ValueError with Abort so that
servers can error more gracefully.
Differential Revision: https://phab.mercurial-scm.org/D5972
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 15 Feb 2019 11:42:54 -0800] rev 41703
tests: remove -q from test-lfs-serve.t
This will make it easier to observe a behavior change in the
next commit.
Differential Revision: https://phab.mercurial-scm.org/D5971