Patchwork D9709: shelve: inline shelvedfile.filename() since there are no callers outside class

login
register
mail settings
Submitter phabricator
Date Jan. 8, 2021, 8:37 p.m.
Message ID <differential-rev-PHID-DREV-gjqwkgvpvgcwwt3kexuz-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/48019/
State Superseded
Headers show

Comments

phabricator - Jan. 8, 2021, 8:37 p.m.
martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D9709

AFFECTED FILES
  mercurial/shelve.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/shelve.py b/mercurial/shelve.py
--- a/mercurial/shelve.py
+++ b/mercurial/shelve.py
@@ -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):