##// 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 596 def _storeclean(self, path):
597 597 clean = True
598 598 itercache = self._calcstorehash(path)
599 try:
600 for filehash in self._readstorehashcache(path):
601 if filehash != itercache.next():
602 clean = False
603 break
604 except StopIteration:
599 for filehash in self._readstorehashcache(path):
600 if filehash != next(itercache, None):
601 clean = False
602 break
603 if clean:
604 # if not empty:
605 605 # the cached and current pull states have a different size
606 clean = False
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
606 clean = next(itercache, None) is None
614 607 return clean
615 608
616 609 def _calcstorehash(self, remotepath):
General Comments 0
You need to be logged in to leave comments. Login now