Patchwork [02,of,10] shelve: rename method for data write/read

login
register
mail settings
Submitter Boris Feld
Date Aug. 29, 2018, 4:30 p.m.
Message ID <748143aab3d4ed04d183.1535560250@localhost.localdomain>
Download mbox | patch
Permalink /patch/34145/
State Accepted
Headers show

Comments

Boris Feld - Aug. 29, 2018, 4:30 p.m.
# HG changeset patch
# User Boris Feld <boris.feld@octobus.net>
# Date 1527586840 -7200
#      Tue May 29 11:40:40 2018 +0200
# Node ID 748143aab3d4ed04d1837a43a58f8d64e0cf6709
# Parent  2127e141f56510b109f915c2fd5eaf3b205ce037
# EXP-Topic internal-phase.shelve
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 748143aab3d4
shelve: rename method for data write/read

There are no user of this code nor any code related to obsshelve in the
extensions right now, so we rename the function before using them.

Note: The shelvedfile looks a bit strange. We should probably refactor it,
however, this is an adventure for another series.

Patch

diff --git a/hgext/shelve.py b/hgext/shelve.py
--- a/hgext/shelve.py
+++ b/hgext/shelve.py
@@ -168,10 +168,10 @@  class shelvedfile(object):
         bundle2.writebundle(self.ui, cg, self.fname, btype, self.vfs,
                                 compression=compression)
 
-    def writeobsshelveinfo(self, info):
+    def writeinfo(self, info):
         scmutil.simplekeyvaluefile(self.vfs, self.fname).write(info)
 
-    def readobsshelveinfo(self):
+    def readinfo(self):
         return scmutil.simplekeyvaluefile(self.vfs, self.fname).read()
 
 class shelvedstate(object):