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
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
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
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
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
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
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
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