Augie Fackler <augie@google.com> [Thu, 31 Jan 2019 11:12:59 -0500] rev 41501
py3: fix test-remotefilelog-repack.t
This is uglier, but more obviously correct in my opinion. I guess
Python 3 doesn't hang on to the exception as long, which seems
reasonable.
Differential Revision: https://phab.mercurial-scm.org/D5781
Augie Fackler <augie@google.com> [Wed, 30 Jan 2019 19:43:43 -0500] rev 41500
tests: alter email `From` line to a value that's consistently parsed
Python2:
>>> email.header.decode_header('=?UTF-8?q?Rapha=C3=ABl=20Hertzog?= <hertzog@debian.org>')
[('Rapha\xc3\xabl Hertzog', 'utf-8'), ('<hertzog@debian.org>', None)]
Python3:
>>> email.header.decode_header('=?UTF-8?q?Rapha=C3=ABl=20Hertzog?= <hertzog@debian.org>')
[(b'Rapha\xc3\xabl Hertzog', 'utf-8'), (b' <hertzog@debian.org>', None)]
So alter the input to an input that parses to the same result
consistently. After skimming the relevant RFC (1342), I'm not sure if
what we had was valid, or how I could modify it to be more consistent.
Differential Revision: https://phab.mercurial-scm.org/D5769
Martin von Zweigbergk <martinvonz@google.com> [Thu, 31 Jan 2019 16:51:52 -0800] rev 41499
diff: drop duplicate filter of copies by destination
I'm pretty sure we don't need to filter copies by destination, at
least since the previous patch.
Differential Revision: https://phab.mercurial-scm.org/D5790
Martin von Zweigbergk <martinvonz@google.com> [Thu, 31 Jan 2019 16:32:54 -0800] rev 41498
diff: use match.intersectmatchers()
Differential Revision: https://phab.mercurial-scm.org/D5789
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 01 Feb 2019 09:13:39 -0800] rev 41497
tests: convert ParseError arguments to str on Python 3
Arguments internally are bytes. Printing the exception on Python 3
will include b'' prefixes. This test file uses a .out file, which
doesn't support conditional output. The easiest way to get this to
pass on Python 3 is to normalize the exception before printing so
there are no b'' prefixes.
Differential Revision: https://phab.mercurial-scm.org/D5793
Matt Harbison <matt_harbison@yahoo.com> [Thu, 31 Jan 2019 22:01:09 -0500] rev 41496
tests: quote $PYTHON for py3 support on Windows
Matt Harbison <matt_harbison@yahoo.com> [Thu, 31 Jan 2019 21:54:38 -0500] rev 41495
py3: byteify the --retest path of run-tests.py
Augie Fackler <augie@google.com> [Wed, 30 Jan 2019 19:18:20 -0500] rev 41494
subrepo: clean up lingering bytes/str issues in svn support
Path encoding is a little suspect in here, but it's not worse than it
was when we were on Python 2 only.
Subversion subrepo tests now pass in Python 3.
Differential Revision: https://phab.mercurial-scm.org/D5774
Martin von Zweigbergk <martinvonz@google.com> [Wed, 30 Jan 2019 16:14:39 -0800] rev 41493
tweakdefaults: set ui.relative-paths instead of command.status.relative
Differential Revision: https://phab.mercurial-scm.org/D5775
Martin von Zweigbergk <martinvonz@google.com> [Tue, 29 Jan 2019 15:37:35 -0800] rev 41492
status: introduce higher-level ui.relative-paths
The existing commands.status.relative trumps the new config. We need
to keep the existing config around for compatibility. However, I don't
think we need to introduce similar command-specific options for other
commands when they learn to respec ui.relative-paths.
Differential Revision: https://phab.mercurial-scm.org/D5746
Martin von Zweigbergk <martinvonz@google.com> [Tue, 29 Jan 2019 15:37:14 -0800] rev 41491
status: extract helper for producing relative or absolute path for UI
I put the helper in scmutil so it can be used by most modules. I would
have put it in utils.pathutil, but I think that's supposed to be
unaware of repos.
Differential Revision: https://phab.mercurial-scm.org/D5745
Navaneeth Suresh <navaneeths1998@gmail.com> [Thu, 31 Jan 2019 18:17:02 +0530] rev 41490
tags: avoid generating commit for an already deleted tag (
issue5752)
`$ hg tag --remove <tagname>` will keep on generating commits
regardless of checking whether the tag is deleted or not. I added a
a fix for `global` tags by aborting if `nullid` is already mapped
to the tag that is to be deleted.
Differential Revision: https://phab.mercurial-scm.org/D5780
Boris Feld <boris.feld@octobus.net> [Fri, 21 Dec 2018 17:10:07 +0100] rev 41489
watchman: detect nested mercurial repositories and abort
Disable fsmonitor on nested mercurial repositories. Only depth one
repositories are detected at the moment.
Differential Revision: https://phab.mercurial-scm.org/D5587
Boris Feld <boris.feld@octobus.net> [Fri, 21 Dec 2018 17:12:31 +0100] rev 41488
watchman: add verbose config knob
This new config knob allows to silent watchman log and warning messages when
watchman is unavailable.
Differential Revision: https://phab.mercurial-scm.org/D5586
Ludovic Chabant <ludovic@chabant.com> [Tue, 29 Jan 2019 22:59:15 -0800] rev 41487
extdiff: add --per-file and --confirm options
The new options lets the user control how the external program is run.
By default, Mercurial passes the 2 snapshot directories as usual, but
it can also run the program repeatedly on each file's snapshot pair,
and optionally prompt the user each time.
Matt Harbison <matt_harbison@yahoo.com> [Wed, 30 Jan 2019 19:20:31 -0500] rev 41486
run-tests: sort the skip, failure and error lists in the final output
This will help keep the lists consistent, for comparison across runs.
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 30 Jan 2019 17:07:58 -0800] rev 41485
tests: add Python 3 output for test-remotefilelog-gc.t
Python 3 raises a slightly different error on invalid paths.
Differential Revision: https://phab.mercurial-scm.org/D5773
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 30 Jan 2019 17:22:07 -0800] rev 41484
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
Augie Fackler <augie@google.com> [Wed, 30 Jan 2019 19:29:32 -0500] rev 41483
subrepo: bytes/str cleanups on Git support
Git subrepo tests now pass on Python 3.
Differential Revision: https://phab.mercurial-scm.org/D5768
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 30 Jan 2019 16:54:34 -0800] rev 41482
tests: compare against a bytes in test-lock.py
skip-blame: just b'' prefixes
Differential Revision: https://phab.mercurial-scm.org/D5771
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 30 Jan 2019 16:53:12 -0800] rev 41481
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
Augie Fackler <augie@google.com> [Wed, 30 Jan 2019 18:49:17 -0500] rev 41480
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
Augie Fackler <augie@google.com> [Wed, 30 Jan 2019 17:24:57 -0500] rev 41479
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
Augie Fackler <augie@google.com> [Wed, 30 Jan 2019 18:32:11 -0500] rev 41478
git: a little pycompat.bytestring() love to make this code work in py3
Differential Revision: https://phab.mercurial-scm.org/D5765
Augie Fackler <augie@google.com> [Thu, 24 Jan 2019 16:07:32 -0500] rev 41477
py3: have test-revset2.t write test scripts in a more portable way
Fixes the test on Python 3.
Differential Revision: https://phab.mercurial-scm.org/D5763
Augie Fackler <augie@google.com> [Wed, 30 Jan 2019 16:43:52 -0500] rev 41476
py3: fix up test-remotefilelog-cacheprocess.t to not depend on a repr
It looks like the repr() of Exceptions is different from Python 2 to
Python 3.7 (but not 3.5?), but the str() is still stable. Sigh.
Differential Revision: https://phab.mercurial-scm.org/D5761
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 30 Jan 2019 13:36:51 -0800] rev 41475
remotefilelog: cast division result to an int
Otherwise mid is a float and this confuses __slice__ on Python 3.
Differential Revision: https://phab.mercurial-scm.org/D5760
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 30 Jan 2019 13:34:47 -0800] rev 41474
tests: cast division result to int
Otherwise it is a float on Python 3 and code later compares about
casting a float to an int.
Differential Revision: https://phab.mercurial-scm.org/D5759
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 30 Jan 2019 13:30:01 -0800] rev 41473
tests: various Python 3 ports for test-remotefilelog-datapack.py
Use bytes I/O. Use byteschr(). Convert temporary path to bytes.
Differential Revision: https://phab.mercurial-scm.org/D5758
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 30 Jan 2019 13:22:42 -0800] rev 41472
tests: use items() in test-remotefilelog-datapack.py
Performance doesn't matter in tests. iteritems() doesn't exist
in Python 3.
Differential Revision: https://phab.mercurial-scm.org/D5757