Show More
@@ -400,7 +400,13 class localrepository(object): | |||||
400 |
|
400 | |||
401 | @storecache('obsstore') |
|
401 | @storecache('obsstore') | |
402 | def obsstore(self): |
|
402 | def obsstore(self): | |
403 | store = obsolete.obsstore(self.sopener) |
|
403 | # read default format for new obsstore. | |
|
404 | defaultformat = self.ui.configint('format', 'obsstore-version', None) | |||
|
405 | # rely on obsstore class default when possible. | |||
|
406 | kwargs = {} | |||
|
407 | if defaultformat is not None: | |||
|
408 | defaultformat['defaultformat'] = defaultformat | |||
|
409 | store = obsolete.obsstore(self.sopener, **kwargs) | |||
404 | if store and not obsolete._enabled: |
|
410 | if store and not obsolete._enabled: | |
405 | # message is rare enough to not be translated |
|
411 | # message is rare enough to not be translated | |
406 | msg = 'obsolete feature not enabled but %i markers found!\n' |
|
412 | msg = 'obsolete feature not enabled but %i markers found!\n' |
@@ -450,7 +450,7 class obsstore(object): | |||||
450 | # parents: (tuple of nodeid) or None, parents of precursors |
|
450 | # parents: (tuple of nodeid) or None, parents of precursors | |
451 | # None is used when no data has been recorded |
|
451 | # None is used when no data has been recorded | |
452 |
|
452 | |||
453 | def __init__(self, sopener): |
|
453 | def __init__(self, sopener, defaultformat=_fm0version): | |
454 | # caches for various obsolescence related cache |
|
454 | # caches for various obsolescence related cache | |
455 | self.caches = {} |
|
455 | self.caches = {} | |
456 | self._all = [] |
|
456 | self._all = [] | |
@@ -459,7 +459,7 class obsstore(object): | |||||
459 | self.children = {} |
|
459 | self.children = {} | |
460 | self.sopener = sopener |
|
460 | self.sopener = sopener | |
461 | data = sopener.tryread('obsstore') |
|
461 | data = sopener.tryread('obsstore') | |
462 |
self._version = |
|
462 | self._version = defaultformat | |
463 | if data: |
|
463 | if data: | |
464 | self._version, markers = _readmarkers(data) |
|
464 | self._version, markers = _readmarkers(data) | |
465 | self._load(markers) |
|
465 | self._load(markers) |
General Comments 0
You need to be logged in to leave comments.
Login now