# HG changeset patch # User Matt DeVore # Date 1507054469 25200 # Node ID 60896df503ba8d81b032b163a83dee5fbb8f16ae # Parent a3a154e49bba8e24d6824a8eda727289d10add95 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. diff -r a3a154e49bba -r 60896df503ba hgext3rd/evolve/obscache.py --- 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