Mercurial > hg-stable
changeset 47167:fbf38517d17d
revlog: introduce a `display_id` property
We currently using the "index file" to identify a revlog in error output. Since
we are about to make the "index file" location more volatile, we need something
better. We move to use the "radix", as it is close to what we currently use.
We could probably do better, as pointed out in the comment, however that would
be a quite detour from my current goal.
Differential Revision: https://phab.mercurial-scm.org/D10579
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 03 May 2021 12:23:07 +0200 |
parents | 09338a2d5c14 |
children | 4532166a50b1 |
files | mercurial/revlog.py |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/revlog.py Mon May 03 12:22:57 2021 +0200 +++ b/mercurial/revlog.py Mon May 03 12:23:07 2021 +0200 @@ -593,6 +593,13 @@ return self.target[0] @util.propertycache + def display_id(self): + """The public facing "ID" of the revlog that we use in message""" + # Maybe we should build a user facing representation of + # revlog.target instead of using `self.radix` + return self.radix + + @util.propertycache def _compressor(self): engine = util.compengines[self._compengine] return engine.revlogcompressor(self._compengineopts)