filelog: add the ability to report the user facing name
authorMatt Harbison <matt_harbison@yahoo.com>
Sun, 07 Jan 2018 15:01:59 -0500
changeset 35567 07769a04bc66
parent 35566 baca93a47992
child 35568 ebf14075a5c1
filelog: add the ability to report the user facing name This will be used by lfs, but is probably generally useful. There are various bits of code that reverse engineer this from the index or data file names, but it seems better to just store it. Especially if there's experimenting with backing storage other than revlog.
mercurial/filelog.py
--- a/mercurial/filelog.py	Tue Dec 19 20:41:25 2017 +0800
+++ b/mercurial/filelog.py	Sun Jan 07 15:01:59 2018 -0500
@@ -43,6 +43,8 @@
     def __init__(self, opener, path):
         super(filelog, self).__init__(opener,
                         "/".join(("data", path + ".i")))
+        # full name of the user visible file, relative to the repository root
+        self.filename = path
 
     def read(self, node):
         t = self.revision(node)