Mercurial > evolve
changeset 3036:60896df503ba
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.
author | Matt DeVore <matvore@google.com> |
---|---|
date | Tue, 03 Oct 2017 11:14:29 -0700 |
parents | a3a154e49bba |
children | 5c8d5f980f49 |
files | hgext3rd/evolve/obscache.py |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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