cext: use modern buffer protocol in patches()
PyObject_AsCharBuffer() is part of the "Old Buffer Protocol," which
has been deprecated for years. Let's port away from it.
PyBuffer_GetBuffer() must be paired with PyBuffer_Release(), hence the
added "goto cleanup" in a failure case.
We don't bump the extension version because the API has not changed.
Differential Revision: https://phab.mercurial-scm.org/D4840
identify: when using -T, avoid unnecessary remote bookmarks query
Differential Revision: https://phab.mercurial-scm.org/D4839
identify: only query remote bookmarks if needed
Instead of all the time when operating on a remote repo. This
perf regression was introduced in
15a79ac823e8, in 4.3.
This datahint method returns nothing for -Tjson, -Tpickle, -Tdebug
--config ui.formatdebug=true and --config ui.formatjson, so the
bookmarks won't show up. I don't know what these formatters are for.
plainformatter and templateformatter work properly, and the few other
uses of datahint should have the same kind of problem.
There is further weirdness where "--template '{node}'" is not enough
to avoid querying the bookmarks, you also need to pass --id or -q.
Differential Revision: https://phab.mercurial-scm.org/D4819
py3: whitelist another passing tests caught by buildbot
I this indygreg recent patches made this test pass on Python 3. So thanks to
him!
Differential Revision: https://phab.mercurial-scm.org/D4848