Mercurial > public > mercurial-scm > hg-stable
diff mercurial/changelog.py @ 47159:c6b8d5d91e73
revlog: deal with special "postfix" explicitely
revlog usually use a straight forward '.i' and '.d' naming except for two cases
"in-transaction" changelog, and censoring. Our goal is to let the revlog code
deal with the internal of the file naming itself. To do so, we need to start
dealing with these postfix explicitly.
Differential Revision: https://phab.mercurial-scm.org/D10571
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 03 May 2021 12:21:46 +0200 |
parents | f58a13c52726 |
children | a07d5cb03a85 |
line wrap: on
line diff
--- a/mercurial/changelog.py Mon May 03 12:21:35 2021 +0200 +++ b/mercurial/changelog.py Mon May 03 12:21:46 2021 +0200 @@ -395,16 +395,19 @@ ``concurrencychecker`` will be passed to the revlog init function, see the documentation there. """ + + indexfile = b'00changelog.i' if trypending and opener.exists(b'00changelog.i.a'): - indexfile = b'00changelog.i.a' + postfix = b'a' else: - indexfile = b'00changelog.i' + postfix = None datafile = b'00changelog.d' revlog.revlog.__init__( self, opener, target=(revlog_constants.KIND_CHANGELOG, None), + postfix=postfix, indexfile=indexfile, datafile=datafile, checkambig=True,