obscache: do not check of argument count of wrapped function
After talking with the original author of this check, it appears that it never
worked properly, since _readmarkers was always wrapped with @util.nogc.
--- a/hgext3rd/evolve/obscache.py Tue Oct 03 22:51:00 2017 +0800
+++ b/hgext3rd/evolve/obscache.py Tue Oct 03 11:14:29 2017 -0700
@@ -111,9 +111,12 @@
return obsstore
-if obsolete._readmarkers.__code__.co_argcount > 1:
+if obsolete._fm0readmarkers.__code__.co_argcount > 1:
# hg-4.3+ has the "offset" parameter, and _fm?readmarkers also have an
# extra "stop" parameter
+ # Note that _readmarkers is wrapped by @util.nogc, so its co_argcount is
+ # misleadingly 0. So we check _fm0readmarkers instead, which increased its
+ # argument count in the same changeset (5d3ba439).
_readmarkers = obsolete._readmarkers
else:
# XXX copied as is from Mercurial 4.2 and added the "offset" parameters