# HG changeset patch # User Pierre-Yves David # Date 1569558282 -7200 # Node ID 188476e48f51055e4c35209cc72b16622c6e14e1 # Parent 8af909893188fb4000a5704be6c39234ee1e8c64 revlog: explicitly set revlogv0 in vfs options Relying on having an attribute or not for something so fundamental seems too fragile to me. (And indeed I had issue with that later in this series). So we explicitly record the fact the repository use revlog-v0. Differential Revision: https://phab.mercurial-scm.org/D6934 diff -r 8af909893188 -r 188476e48f51 mercurial/localrepo.py --- a/mercurial/localrepo.py Fri Sep 27 00:11:03 2019 +0200 +++ b/mercurial/localrepo.py Fri Sep 27 06:24:42 2019 +0200 @@ -748,6 +748,8 @@ # meaningful on such old repos. if b'revlogv1' in requirements or REVLOGV2_REQUIREMENT in requirements: options.update(resolverevlogstorevfsoptions(ui, requirements, features)) + else: # explicitly mark repo as using revlogv0 + options['revlogv0'] = True return options diff -r 8af909893188 -r 188476e48f51 mercurial/revlog.py --- a/mercurial/revlog.py Fri Sep 27 00:11:03 2019 +0200 +++ b/mercurial/revlog.py Fri Sep 27 06:24:42 2019 +0200 @@ -363,10 +363,7 @@ newversionflags = REVLOGV1 | FLAG_INLINE_DATA if 'generaldelta' in opts: newversionflags |= FLAG_GENERALDELTA - elif getattr(self.opener, 'options', None) is not None: - # If options provided but no 'revlog*' found, the repository - # would have no 'requires' file in it, which means we have to - # stick to the old format. + elif 'revlogv0' in getattr(self.opener, 'options', {}): newversionflags = REVLOGV0 else: newversionflags = REVLOG_DEFAULT_VERSION