Show More
@@ -607,8 +607,8 b' class obsstore(object):' | |||
|
607 | 607 | offset = f.tell() |
|
608 | 608 | transaction.add('obsstore', offset) |
|
609 | 609 | # offset == 0: new file - add the version header |
|
610 |
|
|
|
611 |
|
|
|
610 | data = b''.join(encodemarkers(new, offset == 0, self._version)) | |
|
611 | f.write(data) | |
|
612 | 612 | finally: |
|
613 | 613 | # XXX: f.close() == filecache invalidation == obsstore rebuilt. |
|
614 | 614 | # call 'filecacheentry.refresh()' here |
@@ -616,7 +616,7 b' class obsstore(object):' | |||
|
616 | 616 | addedmarkers = transaction.changes.get('obsmarkers') |
|
617 | 617 | if addedmarkers is not None: |
|
618 | 618 | addedmarkers.update(new) |
|
619 | self._addmarkers(new) | |
|
619 | self._addmarkers(new, data) | |
|
620 | 620 | # new marker *may* have changed several set. invalidate the cache. |
|
621 | 621 | self.caches.clear() |
|
622 | 622 | # records the number of new markers for the transaction hooks |
@@ -673,8 +673,9 b' class obsstore(object):' | |||
|
673 | 673 | def _cached(self, attr): |
|
674 | 674 | return attr in self.__dict__ |
|
675 | 675 | |
|
676 | def _addmarkers(self, markers): | |
|
676 | def _addmarkers(self, markers, rawdata): | |
|
677 | 677 | markers = list(markers) # to allow repeated iteration |
|
678 | self._data = self._data + rawdata | |
|
678 | 679 | self._all.extend(markers) |
|
679 | 680 | if self._cached('successors'): |
|
680 | 681 | _addsuccessors(self.successors, markers) |
General Comments 0
You need to be logged in to leave comments.
Login now