bookmarks: use "vfs.unlink()" instead of "util.unlink()"
authorFUJIWARA Katsunori <foozy@lares.dti.ne.jp>
Tue, 15 Oct 2013 00:51:04 +0900
changeset 19895 37c0d93fb166
parent 19894 df91e2df6ba3
child 19896 af03279c766a
bookmarks: use "vfs.unlink()" instead of "util.unlink()"
mercurial/bookmarks.py
mercurial/scmutil.py
--- a/mercurial/bookmarks.py	Thu Oct 03 18:01:21 2013 +0200
+++ b/mercurial/bookmarks.py	Tue Oct 15 00:51:04 2013 +0900
@@ -126,7 +126,7 @@
     wlock = repo.wlock()
     try:
         try:
-            util.unlink(repo.join('bookmarks.current'))
+            repo.vfs.unlink('bookmarks.current')
             repo._bookmarkcurrent = None
         except OSError, inst:
             if inst.errno != errno.ENOENT:
--- a/mercurial/scmutil.py	Thu Oct 03 18:01:21 2013 +0200
+++ b/mercurial/scmutil.py	Tue Oct 15 00:51:04 2013 +0900
@@ -271,6 +271,9 @@
     def stat(self, path=None):
         return os.stat(self.join(path))
 
+    def unlink(self, path=None):
+        return util.unlink(self.join(path))
+
 class vfs(abstractvfs):
     '''Operate files relative to a base directory