- Nov 04, 2019
-
-
Ian Moody authored
Similar to 5fa8ac91190e / D7206, should get test-install.t passing on py3. Differential Revision: https://phab.mercurial-scm.org/D7218
-
Denis Laxalde authored
This improves the rendering of some exceptions by avoiding raw bytestrings, especially when using --traceback option.
-
Denis Laxalde authored
Similar to a973a75e92bf or 3e9c6cef949b.
-
- Nov 01, 2019
-
-
Gregory Szorc authored
This should unblock us from running the code formatting test in our automated environment. Differential Revision: https://phab.mercurial-scm.org/D7197
-
- Nov 02, 2019
-
-
Ian Moody authored
Avoids a TypeError under py3. Fortunately this is very much an edge case since it requires the user to have deliberately created a local tag of the form 'D\d+' that isn't truthful. Differential Revision: https://phab.mercurial-scm.org/D7215
-
Gregory Szorc authored
Unavailable.msg should now always be bytes. We also rename Unavailable.__str__ to __bytes__ as it always returns bytes. We make __str__ a simple wrapper that decodes that result to str. There's probably some excessive strutil.forcebytestr() in fsmonitor/__init__.py now. But at least the exceptions around type coercion should now be gone. Differential Revision: https://phab.mercurial-scm.org/D7214
-
Gregory Szorc authored
We normalize the value returned by watchman because we perform a number of compares with this value in code. So the easiest path forward is to normalize to bytes so we don't have to update many call sites. With this commit, the fsmonitor extension appears to be working with Python 3! Although there are still some failures in edge cases... Differential Revision: https://phab.mercurial-scm.org/D7213
-
Gregory Szorc authored
This is needed for Python 3 compatibility. Differential Revision: https://phab.mercurial-scm.org/D7212
-
Gregory Szorc authored
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
-
Gregory Szorc authored
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
-
Gregory Szorc authored
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
-
Gregory Szorc authored
Without this, we get a str/bytes mismatching when using % formatting a few lines below. Differential Revision: https://phab.mercurial-scm.org/D7208
-
Gregory Szorc authored
There is no repo._root. It looks like fsmonitor has been busted since this access was introduced in ab1900323b1d in July 2019! Differential Revision: https://phab.mercurial-scm.org/D7207
-
Gregory Szorc authored
Without this, we get errors due to passing str to a function which expects bytes. Differential Revision: https://phab.mercurial-scm.org/D7206
-
Gregory Szorc authored
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
-
Gregory Szorc authored
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
-
Gregory Szorc authored
The recent revendoring of pywatchman undid this bug fix. Let's reapply it. Differential Revision: https://phab.mercurial-scm.org/D7203
-
Gregory Szorc authored
The recently vendored pywatchman code base is now formatted with black. We can now remove pywatchman from our black exclusion rule. Differential Revision: https://phab.mercurial-scm.org/D7202
-
Gregory Szorc authored
This commit vendors pywatchman commit 259dc66dc9591f9b7ce76d0275bb1065f390c9b1 from upstream without modifications. The previously vendored pywatchman from changeset 16f4b341288d was from Git commit c77452. This commit effectively undoes the following Mercurial changesets: * dd35abc409ee fsmonitor: correct an error message * b1f62cd39b5c fsmonitor: layer on another hack in bser.c for os.stat() compat (issue5811) * c31ce080eb75 py3: convert arguments, cwd and env to native strings when spawning subprocess * 876494fd967d cleanup: delete lots of unused local variables * 57264906a996 watchman: add the possibility to set the exact watchman binary location The newly-vendored code has support for specifying the binary location, so 57264906a996 does not need applied. But we do need to modify our code to specify a proper argument name. 876494fd967d is not important, so it will be ignored. c31ce080eb75 globally changed the code base to always pass str to subprocess. But pywatchman's code is Python 3 clean, so we don't need to do this. This leaves dd35abc409ee and b1f62cd39b5c, which will be re-applied in subsequent commits. Differential Revision: https://phab.mercurial-scm.org/D7201
-
- Nov 04, 2019
-
-
Denis Laxalde authored
-
Denis Laxalde authored
-
Denis Laxalde authored
We drop 'catlogparser' attribute now unused.
-
Denis Laxalde authored
This fixes this test on Python 3 with a long hostname. See changeset 4128ffba4431 for details.
-
- Nov 02, 2019
-
-
Gregory Szorc authored
Python 3.5's json.loads() requires a str. Only Python 3.6+ supports passing a bytes or bytearray. This commit implements a json.loads() polyfill on Python 3.5 so that we can use bytes. The added function to detect encodings comes verbatim from Python 3.7.
-
Gregory Szorc authored
This script makes use of `token.COMMENT`, which apparently isn't present until Python 3.6. So make the script and its test conditional on Python 3.6.
-
Gregory Szorc authored
There was an inline comment denoting a bug in the lazy extension loader on Python 3.5 which prevents it from working there. But the code was not conditional on the Python version. The result of this was a myriad of failures on Python 3.5 due to getattr() and friends not working on lazy extension modules. By making extension modules non-lazy on Python 3.5, we reduce the number of test failures from 48 to 22 on that Python version.
-
Gregory Szorc authored
I was using `hg absorb` with Python 3 and noticed that the prompt was appearing without any output about what would be done. After I answered the prompt, the output was printed to stdout. This appears to be a buffering difference between Python 2 and Python 3. To work around it, this commit adds an explicit flush() before calling the raw input function when readline is used.
-
Martin von Zweigbergk authored
I accidentally switched from 12 digits to 40 digits while making the code py3-compatible. Thanks to Yuya for noticing. Differential Revision: https://phab.mercurial-scm.org/D7200
-
- Oct 29, 2019
-
-
Martin von Zweigbergk authored
Differential Revision: https://phab.mercurial-scm.org/D7180
-
- Nov 01, 2019
-
-
Emmanuel Leblond authored
Differential Revision: https://phab.mercurial-scm.org/D7190
-
- Oct 31, 2019
-
-
Martin von Zweigbergk authored
Now you should be able to successfully confirm your histedit plan (at least in the case I tried). Even continuing after conflicts and finishing the histedit worked. Differential Revision: https://phab.mercurial-scm.org/D7186
-
Martin von Zweigbergk authored
We write bytes to the file, so it should be open in binary mode. Opening it via the vfs takes care of that for us. Now you'll get yet a different traceback if you try to confirm you histedit plan. Differential Revision: https://phab.mercurial-scm.org/D7185
-
Martin von Zweigbergk authored
Now you'll get a different traceback if you try to confirm you histedit plan. Differential Revision: https://phab.mercurial-scm.org/D7184
-
Martin von Zweigbergk authored
Now you can also reorder commits that (potentially) conflict. Just don't try to confirm the changes yet (because then it crashes). Differential Revision: https://phab.mercurial-scm.org/D7183
-
Martin von Zweigbergk authored
Now you can navigate and change the action for a commit. You can also reorder commits, as long as that doesn't result in a conflict (then it crashes). Differential Revision: https://phab.mercurial-scm.org/D7182
-
Martin von Zweigbergk authored
Now you can see the list of commits, but it crashes when you press a key. Differential Revision: https://phab.mercurial-scm.org/D7181
-
- Nov 01, 2019
-
-
Emmanuel Leblond authored
Differential Revision: https://phab.mercurial-scm.org/D7191
-
Emmanuel Leblond authored
Differential Revision: https://phab.mercurial-scm.org/D7192
-
Emmanuel Leblond authored
Differential Revision: https://phab.mercurial-scm.org/D7193
-
Emmanuel Leblond authored
Differential Revision: https://phab.mercurial-scm.org/D7194
-