# HG changeset patch # User Pierre-Yves David # Date 1494511591 -7200 # Node ID 827d0f0a483f68ade16e5438040cdd7e671da590 # Parent 37749a3cd3d1cbccaa3de1a8230bf235c50ffe9b obscache: use the smaller scope function This make the function simpler and allow larger update on the 'upgradeneeded' one. diff -r 37749a3cd3d1 -r 827d0f0a483f hgext3rd/evolve/obscache.py --- a/hgext3rd/evolve/obscache.py Thu May 11 16:05:50 2017 +0200 +++ b/hgext3rd/evolve/obscache.py Thu May 11 16:06:31 2017 +0200 @@ -242,8 +242,10 @@ def uptodate(self, repo): if self._cachekey is None: self.load(repo) - valid, startrev, startidx = upgradeneeded(repo, self._cachekey) - return (valid and startrev is None and startidx is None) + status = _checkkey(repo, self._cachekey) + return (status is not None + and status[0] == self._cachekey[0] # tiprev + and status[1] == self._cachekey[3]) # obssize def update(self, repo): """Iteratively update the cache with new repository data"""