Mercurial > evolve
changeset 2344:827d0f0a483f
obscache: use the smaller scope function
This make the function simpler and allow larger update on the 'upgradeneeded'
one.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 11 May 2017 16:06:31 +0200 |
parents | 37749a3cd3d1 |
children | 406c1a57b4ee |
files | hgext3rd/evolve/obscache.py |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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"""