Show More
@@ -67,7 +67,7 b' The header is followed by the markers. M' | |||
|
67 | 67 | comment associated with each format for details. |
|
68 | 68 | |
|
69 | 69 | """ |
|
70 | import struct | |
|
70 | import errno, struct | |
|
71 | 71 | import util, base85, node, parsers |
|
72 | 72 | import phases |
|
73 | 73 | from i18n import _ |
@@ -531,6 +531,15 b' class obsstore(object):' | |||
|
531 | 531 | return len(self._all) |
|
532 | 532 | |
|
533 | 533 | def __nonzero__(self): |
|
534 | if not self._cached('_all'): | |
|
535 | try: | |
|
536 | return self.svfs.stat('obsstore').st_size > 1 | |
|
537 | except OSError as inst: | |
|
538 | if inst.errno != errno.ENOENT: | |
|
539 | raise | |
|
540 | # just build an empty _all list if no obsstore exists, which | |
|
541 | # avoids further stat() syscalls | |
|
542 | pass | |
|
534 | 543 | return bool(self._all) |
|
535 | 544 | |
|
536 | 545 | def create(self, transaction, prec, succs=(), flag=0, parents=None, |
General Comments 0
You need to be logged in to leave comments.
Login now