Show More
@@ -145,7 +145,7 b' def _readmarkers(data):' | |||||
145 | if diskversion not in formats: |
|
145 | if diskversion not in formats: | |
146 | raise util.Abort(_('parsing obsolete marker: unknown version %r') |
|
146 | raise util.Abort(_('parsing obsolete marker: unknown version %r') | |
147 | % diskversion) |
|
147 | % diskversion) | |
148 | return formats[diskversion][0](data, off) |
|
148 | return diskversion, formats[diskversion][0](data, off) | |
149 |
|
149 | |||
150 | def _fm0readmarkers(data, off=0): |
|
150 | def _fm0readmarkers(data, off=0): | |
151 | """Read and enumerate markers from raw data in format version 0""" |
|
151 | """Read and enumerate markers from raw data in format version 0""" | |
@@ -312,7 +312,8 b' class obsstore(object):' | |||||
312 | self.sopener = sopener |
|
312 | self.sopener = sopener | |
313 | data = sopener.tryread('obsstore') |
|
313 | data = sopener.tryread('obsstore') | |
314 | if data: |
|
314 | if data: | |
315 |
|
|
315 | version, markers = _readmarkers(data) | |
|
316 | self._load(markers) | |||
316 |
|
317 | |||
317 | def __iter__(self): |
|
318 | def __iter__(self): | |
318 | return iter(self._all) |
|
319 | return iter(self._all) | |
@@ -396,7 +397,7 b' class obsstore(object):' | |||||
396 | """merge a binary stream of markers inside the obsstore |
|
397 | """merge a binary stream of markers inside the obsstore | |
397 |
|
398 | |||
398 | Returns the number of new markers added.""" |
|
399 | Returns the number of new markers added.""" | |
399 | markers = _readmarkers(data) |
|
400 | version, markers = _readmarkers(data) | |
400 | return self.add(transaction, markers) |
|
401 | return self.add(transaction, markers) | |
401 |
|
402 | |||
402 | def _load(self, markers): |
|
403 | def _load(self, markers): |
General Comments 0
You need to be logged in to leave comments.
Login now