Mercurial > public > mercurial-scm > hg
comparison mercurial/cmdutil.py @ 47150:8d3c2f9d4af7
revlog: use a "radix" to address revlog
Instead of pointing to the index directly and to derive the other file from
that, we directly provide the radix and let the revlog determine the associated
file path internally. This is more robust and will give us more flexibility for
picking this file name in the future.
Differential Revision: https://phab.mercurial-scm.org/D10576
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 03 May 2021 12:22:36 +0200 |
parents | bea4717415c0 |
children | 54849b65dc5f |
comparison
equal
deleted
inserted
replaced
47149:396442cd7e6a | 47150:8d3c2f9d4af7 |
---|---|
1435 | 1435 |
1436 target = (revlog_constants.KIND_OTHER, b'free-form:%s' % file_) | 1436 target = (revlog_constants.KIND_OTHER, b'free-form:%s' % file_) |
1437 r = revlog.revlog( | 1437 r = revlog.revlog( |
1438 vfsmod.vfs(encoding.getcwd(), audit=False), | 1438 vfsmod.vfs(encoding.getcwd(), audit=False), |
1439 target=target, | 1439 target=target, |
1440 indexfile=file_[:-2] + b".i", | 1440 radix=file_[:-2], |
1441 ) | 1441 ) |
1442 return r | 1442 return r |
1443 | 1443 |
1444 | 1444 |
1445 def openrevlog(repo, cmd, file_, opts): | 1445 def openrevlog(repo, cmd, file_, opts): |