comparison hgext/shelve.py @ 31311:f59b6cf663a9

vfs: use repo.vfs.unlinkpath
author Mads Kiilerich <mads@kiilerich.com>
date Sat, 11 Mar 2017 11:02:25 -0800
parents 636f55b9ba23
children 7eb53603744b
comparison
equal deleted inserted replaced
31310:431d4f73249e 31311:f59b6cf663a9
216 fp.write('%s\n' % (cls._keep if keep else cls._nokeep)) 216 fp.write('%s\n' % (cls._keep if keep else cls._nokeep))
217 fp.close() 217 fp.close()
218 218
219 @classmethod 219 @classmethod
220 def clear(cls, repo): 220 def clear(cls, repo):
221 util.unlinkpath(repo.join(cls._filename), ignoremissing=True) 221 repo.vfs.unlinkpath(cls._filename, ignoremissing=True)
222 222
223 def cleanupoldbackups(repo): 223 def cleanupoldbackups(repo):
224 vfs = vfsmod.vfs(repo.join(backupdir)) 224 vfs = vfsmod.vfs(repo.join(backupdir))
225 maxbackups = repo.ui.configint('shelve', 'maxbackups', 10) 225 maxbackups = repo.ui.configint('shelve', 'maxbackups', 10)
226 hgfiles = [f for f in vfs.listdir() 226 hgfiles = [f for f in vfs.listdir()