Mercurial > public > mercurial-scm > hg-stable
diff contrib/perf.py @ 47163:396442cd7e6a
revlog: rename `datafile` to `datafile`
We want to make the actual location of the datafile and location more of an
implementation details than what is is currently. In that process, we make the
attribute private.
Differential Revision: https://phab.mercurial-scm.org/D10575
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 03 May 2021 12:22:26 +0200 |
parents | a07d5cb03a85 |
children | 8d3c2f9d4af7 |
line wrap: on
line diff
--- a/contrib/perf.py Mon May 03 12:22:16 2021 +0200 +++ b/contrib/perf.py Mon May 03 12:22:26 2021 +0200 @@ -3040,7 +3040,9 @@ # compatibility with <= hg-5.8 indexfile = getattr(orig, 'indexfile') origindexpath = orig.opener.join(indexfile) - origdatapath = orig.opener.join(orig.datafile) + + datafile = getattr(orig, '_datafile', getattr(orig, 'datafile')) + origdatapath = orig.opener.join(datafile) indexname = 'revlog.i' dataname = 'revlog.d' @@ -3141,7 +3143,8 @@ indexfile = getattr(rl, 'indexfile') return getsvfs(repo)(indexfile) else: - return getsvfs(repo)(rl.datafile) + datafile = getattr(rl, 'datafile', getattr(rl, 'datafile')) + return getsvfs(repo)(datafile) def doread(): rl.clearcaches()