hg: raise Abort on invalid path
Currently, some os.path functions when opening repositories may
raise an uncaught TypeError or ValueError if the path is invalid.
Let's catch these exceptions and turn them into an Abort for
convenience.
Differential Revision: https://phab.mercurial-scm.org/D5772
subrepo: bytes/str cleanups on Git support
Git subrepo tests now pass on Python 3.
Differential Revision: https://phab.mercurial-scm.org/D5768
tests: compare against a bytes in test-lock.py
skip-blame: just b'' prefixes
Differential Revision: https://phab.mercurial-scm.org/D5771
tests: perform a shallow copy instead of a deep copy
Python 3 can't perform a deep copy because it looks like symbols
in the locals() namespace are not deep-copyable. For the curious,
somehow the deepcopy() is attempting to copy objects attached to
the unittest.* functions for the running test!
We don't use deepcopy() anywhere in the code base and a shallow
object copy should be sufficient to test lock copying.
Actually, I'm not sure why we even test this, as I couldn't find
copy.copy() being used for lock copying either. Who knows.
Differential Revision: https://phab.mercurial-scm.org/D5770
tests: make and use a new `svnurlof.py` helper for constructing svn urls
The previous trick of a Python oneliner and some subshells is too hard
to make portable, and this lets us consolidate some Windows-specific
logic down to a single place.
Differential Revision: https://phab.mercurial-scm.org/D5766
server: skip logging of ECONNRESET
I believe this was exposed by
5492dc20, because the sending of the 500
would have already failed and prevented this logging. On Python 3,
this will be a ConnectionResetError, which is a subtype of OSError,
which is why we check for both OSError and socket.error.
Bonus: this fixes a race in test-hgweb.t where sometimes the
ECONNRESET wouldn't happen, because now we just don't log those
errors.
Differential Revision: https://phab.mercurial-scm.org/D5764