From patchwork Tue Oct 1 16:38:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D6934: revlog: explicitly set revlogv0 in vfs options From: phabricator X-Patchwork-Id: 41901 Message-Id: <4111462f7181627262e1b11d12944042@localhost.localdomain> To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Tue, 1 Oct 2019 16:38:20 +0000 marmoute updated this revision to Diff 16748. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D6934?vs=16731&id=16748 CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D6934/new/ REVISION DETAIL https://phab.mercurial-scm.org/D6934 AFFECTED FILES mercurial/localrepo.py mercurial/revlog.py CHANGE DETAILS To: marmoute, martinvonz, durin42, indygreg, #hg-reviewers, pulkit Cc: mercurial-devel diff --git a/mercurial/revlog.py b/mercurial/revlog.py --- a/mercurial/revlog.py +++ b/mercurial/revlog.py @@ -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 diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -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