Mercurial > hg
comparison hgext/shelve.py @ 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 | 5b327880a660 |
children | df54786a3203 |
comparison
equal
deleted
inserted
replaced
19907:aebfbb68fe92 | 19908:07ee5c8867ca |
---|---|
109 fp.write('%s\n' % name) | 109 fp.write('%s\n' % name) |
110 fp.write('%s\n' % ' '.join([hex(p) for p in repo.dirstate.parents()])) | 110 fp.write('%s\n' % ' '.join([hex(p) for p in repo.dirstate.parents()])) |
111 fp.write('%s\n' % ' '.join([hex(n) for n in stripnodes])) | 111 fp.write('%s\n' % ' '.join([hex(n) for n in stripnodes])) |
112 fp.close() | 112 fp.close() |
113 | 113 |
114 @staticmethod | 114 @classmethod |
115 def clear(repo): | 115 def clear(cls, repo): |
116 util.unlinkpath(repo.join('shelvedstate'), ignoremissing=True) | 116 util.unlinkpath(repo.join(cls._filename), ignoremissing=True) |
117 | 117 |
118 def createcmd(ui, repo, pats, opts): | 118 def createcmd(ui, repo, pats, opts): |
119 def publicancestors(ctx): | 119 def publicancestors(ctx): |
120 """Compute the heads of the public ancestors of a commit. | 120 """Compute the heads of the public ancestors of a commit. |
121 | 121 |