Sat, 02 Nov 2019 14:27:55 -0700 fsmonitor: use next() instead of .next() stable
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 02 Nov 2019 14:27:55 -0700] rev 43396
fsmonitor: use next() instead of .next() This is needed for Python 3 compatibility. Differential Revision: https://phab.mercurial-scm.org/D7212
Sat, 02 Nov 2019 14:26:06 -0700 fsmonitor: normalize Watchman paths to bytes stable
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 02 Nov 2019 14:26:06 -0700] rev 43395
fsmonitor: normalize Watchman paths to bytes Otherwise it will be a str on Python 3 and operations below which operate in the bytes domain will fail. Differential Revision: https://phab.mercurial-scm.org/D7211
Sat, 02 Nov 2019 14:17:48 -0700 fsmonitor: handle unicode keys in tuples stable
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 02 Nov 2019 14:17:48 -0700] rev 43394
fsmonitor: handle unicode keys in tuples In Python 3, keys in the bset tuple are typically str, not bytes. PyBytes_AsString() would return NULL. But we weren't checking the return value and this would lead to a segfault. This commit makes the code type and Python version aware. The Python version specific code is to allow us to utilize a modern API for converting str -> char* without having to allocate an extra PyObject. FWIW I wanted to assume that keys were always str. However, there appear to be some bytes keys in some cases. I haven't debugged this further. Differential Revision: https://phab.mercurial-scm.org/D7210
Sat, 02 Nov 2019 13:39:23 -0700 fsmonitor: make _hashignore compatible with Python 3 stable
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 02 Nov 2019 13:39:23 -0700] rev 43393
fsmonitor: make _hashignore compatible with Python 3 The Hasher wants a bytes but we were feeding it a str. Let's use our repr() implementation to return bytes. In addition, the hexdigest() would return a str, which would be compared against a bytes and would always fail. Normalize to bytes so the compare works. Differential Revision: https://phab.mercurial-scm.org/D7209
Sat, 02 Nov 2019 13:34:40 -0700 fsmonitor: normalize hostname to bytes stable
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 02 Nov 2019 13:34:40 -0700] rev 43392
fsmonitor: normalize hostname to bytes Without this, we get a str/bytes mismatching when using % formatting a few lines below. Differential Revision: https://phab.mercurial-scm.org/D7208
Sat, 02 Nov 2019 13:30:23 -0700 fsmonitor: access repo.root stable
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 02 Nov 2019 13:30:23 -0700] rev 43391
fsmonitor: access repo.root There is no repo._root. It looks like fsmonitor has been busted since this access was introduced in ab1900323b1 in July 2019! Differential Revision: https://phab.mercurial-scm.org/D7207
Sat, 02 Nov 2019 13:08:20 -0700 fsmonitor: coerce watchman exception to bytes stable
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 02 Nov 2019 13:08:20 -0700] rev 43390
fsmonitor: coerce watchman exception to bytes Without this, we get errors due to passing str to a function which expects bytes. Differential Revision: https://phab.mercurial-scm.org/D7206
Sat, 02 Nov 2019 13:04:47 -0700 fsmonitor: fix str/bytes mismatch when accessing watchman version stable
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 02 Nov 2019 13:04:47 -0700] rev 43389
fsmonitor: fix str/bytes mismatch when accessing watchman version There were 2 bugs here. First, keys in the tuple are always str. Second, we needed to normalize the value to bytes to prevent a str/bytes mismatch on Python 3. With this commit, `hg debuginstall` with fsmonitor enabled now works on Python 3. Differential Revision: https://phab.mercurial-scm.org/D7205
Sat, 02 Nov 2019 12:54:47 -0700 fsmonitor: reapply b1f62cd39b5c stable
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 02 Nov 2019 12:54:47 -0700] rev 43388
fsmonitor: reapply b1f62cd39b5c The recent revendoring of pywatchman undid this changeset. Let's reapply it. This commit was generated by running `hg graft -f b1f62cd39b5c`. It applied cleanly. Differential Revision: https://phab.mercurial-scm.org/D7204
Sat, 02 Nov 2019 12:52:58 -0700 fsmonitor: reapply dd35abc409ee stable
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 02 Nov 2019 12:52:58 -0700] rev 43387
fsmonitor: reapply dd35abc409ee The recent revendoring of pywatchman undid this bug fix. Let's reapply it. Differential Revision: https://phab.mercurial-scm.org/D7203
(0) -30000 -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 +3000 tip