##// END OF EJS Templates
context: remove basectx.__int__ (API)...
context: remove basectx.__int__ (API) basectx is the only type in the repo having __int__ implemented. This magic method can result in unexpected coercion. Furthermore, having it implemented is wrong for some contexts, since rev() may return None in some cases. Previous commits removed known cases in core where contexts are coerced to integers. So let's delete basectx.__int__. This commit is a bit dangerous. While the test suite passes, there are likely still some callers in core that rely on __int__ that don't have test coverage. An alternative would be to issue a deprecation warning and let this bake for a few releases. .. api:: context.basectx no longer implements __int__. Context instances will no longer cast to ints. Consumers should call ``ctx.rev()`` instead. Differential Revision: https://phab.mercurial-scm.org/D2433
Gregory Szorc -
r36429:38f48050 default
Show More
Name Size Modified Last Commit Author
/ hgext / fsmonitor / pywatchman
__init__.py Loading ...
bser.c Loading ...
capabilities.py Loading ...
compat.py Loading ...
encoding.py Loading ...
load.py Loading ...
pybser.py Loading ...