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