shelve: inline shelvedfile.filename() since there are no callers outside class
authorMartin von Zweigbergk <martinvonz@google.com>
Thu, 07 Jan 2021 16:08:30 -0800
changeset 46282 0a69f9e640ec
parent 46281 a34607b6d320
child 46283 8db5fa212ab0
shelve: inline shelvedfile.filename() since there are no callers outside class Differential Revision: https://phab.mercurial-scm.org/D9709
mercurial/shelve.py
--- a/mercurial/shelve.py	Thu Jan 07 15:24:46 2021 -0800
+++ b/mercurial/shelve.py	Thu Jan 07 16:08:30 2021 -0800
@@ -90,9 +90,6 @@
     def exists(self):
         return self.vfs.exists(self.fname)
 
-    def filename(self):
-        return self.vfs.join(self.fname)
-
     def backupfilename(self):
         def gennames(base):
             yield base
@@ -108,7 +105,7 @@
     def movetobackup(self):
         if not self.backupvfs.isdir():
             self.backupvfs.makedir()
-        util.rename(self.filename(), self.backupfilename())
+        util.rename(self.vfs.join(self.fname), self.backupfilename())
 
 
 class Shelf(object):