changeset 19908:07ee5c8867ca

shelve: use the class constant in the clear method This class attribut is used everywhere else. Not using it in clear will get us in trouble sooner or later.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Mon, 14 Oct 2013 17:46:47 +0200
parents aebfbb68fe92
children df54786a3203
files hgext/shelve.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/shelve.py	Sat Oct 12 11:29:28 2013 +0400
+++ b/hgext/shelve.py	Mon Oct 14 17:46:47 2013 +0200
@@ -111,9 +111,9 @@
         fp.write('%s\n' % ' '.join([hex(n) for n in stripnodes]))
         fp.close()
 
-    @staticmethod
-    def clear(repo):
-        util.unlinkpath(repo.join('shelvedstate'), ignoremissing=True)
+    @classmethod
+    def clear(cls, repo):
+        util.unlinkpath(repo.join(cls._filename), ignoremissing=True)
 
 def createcmd(ui, repo, pats, opts):
     def publicancestors(ctx):