Mercurial > hg
diff mercurial/obsolete.py @ 22852:e994b034e91e
obsolete: add a "format.obsstore-version" config option
This option controls what version of the binary format to use when creating a new
obsstore file.
Default is still the old format. No safeguards are currently placed around the
option value, but no clueless users are in danger of harm since it is
undocumented.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Tue, 16 Sep 2014 17:52:40 -0700 |
parents | 974389427e5f |
children | f8a4ce6fb27a |
line wrap: on
line diff
--- a/mercurial/obsolete.py Thu Oct 09 00:10:10 2014 -0700 +++ b/mercurial/obsolete.py Tue Sep 16 17:52:40 2014 -0700 @@ -450,7 +450,7 @@ # parents: (tuple of nodeid) or None, parents of precursors # None is used when no data has been recorded - def __init__(self, sopener): + def __init__(self, sopener, defaultformat=_fm0version): # caches for various obsolescence related cache self.caches = {} self._all = [] @@ -459,7 +459,7 @@ self.children = {} self.sopener = sopener data = sopener.tryread('obsstore') - self._version = _fm0version + self._version = defaultformat if data: self._version, markers = _readmarkers(data) self._load(markers)