##// END OF EJS Templates
subrepo: further replacement of try/except with 'next'...
Pierre-Yves David -
r25172:ca9c02cb default
parent child Browse files
Show More
@@ -596,21 +596,14 b' class hgsubrepo(abstractsubrepo):'
596 def _storeclean(self, path):
596 def _storeclean(self, path):
597 clean = True
597 clean = True
598 itercache = self._calcstorehash(path)
598 itercache = self._calcstorehash(path)
599 try:
599 for filehash in self._readstorehashcache(path):
600 for filehash in self._readstorehashcache(path):
600 if filehash != next(itercache, None):
601 if filehash != itercache.next():
601 clean = False
602 clean = False
602 break
603 break
603 if clean:
604 except StopIteration:
604 # if not empty:
605 # the cached and current pull states have a different size
605 # the cached and current pull states have a different size
606 clean = False
606 clean = next(itercache, None) is None
607 if clean:
608 try:
609 itercache.next()
610 # the cached and current pull states have a different size
611 clean = False
612 except StopIteration:
613 pass
614 return clean
607 return clean
615
608
616 def _calcstorehash(self, remotepath):
609 def _calcstorehash(self, remotepath):
General Comments 0
You need to be logged in to leave comments. Login now