obscache: use the smaller scope function
This make the function simpler and allow larger update on the 'upgradeneeded'
one.
--- 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"""