mercurial/revlog.py
changeset 49534 92892dff03f3
parent 49533 8d6c8a9a91f8
child 49609 9cac281eb9c0
--- a/mercurial/revlog.py	Wed Oct 19 11:24:20 2022 -0400
+++ b/mercurial/revlog.py	Wed Oct 19 11:50:40 2022 -0400
@@ -44,6 +44,7 @@
     FLAG_INLINE_DATA,
     INDEX_HEADER,
     KIND_CHANGELOG,
+    KIND_FILELOG,
     RANK_UNKNOWN,
     REVLOGV0,
     REVLOGV1,
@@ -652,9 +653,12 @@
     @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
+        if self.revlog_kind == KIND_FILELOG:
+            # Reference the file without the "data/" prefix, so it is familiar
+            # to the user.
+            return self.target[1]
+        else:
+            return self.radix
 
     def _get_decompressor(self, t):
         try: