changeset 46282:0a69f9e640ec

shelve: inline shelvedfile.filename() since there are no callers outside class Differential Revision: https://phab.mercurial-scm.org/D9709
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 07 Jan 2021 16:08:30 -0800
parents a34607b6d320
children 8db5fa212ab0
files mercurial/shelve.py
diffstat 1 files changed, 1 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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):