bookmarks: use "vfs.utime()" instead of "os.utime()"
authorFUJIWARA Katsunori <foozy@lares.dti.ne.jp>
Tue, 15 Oct 2013 00:51:04 +0900
changeset 19896 af03279c766a
parent 19895 37c0d93fb166
child 19897 896a4568def7
bookmarks: use "vfs.utime()" instead of "os.utime()"
mercurial/bookmarks.py
mercurial/scmutil.py
--- a/mercurial/bookmarks.py	Tue Oct 15 00:51:04 2013 +0900
+++ b/mercurial/bookmarks.py	Tue Oct 15 00:51:04 2013 +0900
@@ -8,7 +8,7 @@
 from mercurial.i18n import _
 from mercurial.node import hex
 from mercurial import encoding, error, util, obsolete
-import errno, os
+import errno
 
 class bmstore(dict):
     """Storage for bookmarks.
@@ -70,7 +70,7 @@
 
             # touch 00changelog.i so hgweb reloads bookmarks (no lock needed)
             try:
-                os.utime(repo.sjoin('00changelog.i'), None)
+                repo.svfs.utime('00changelog.i', None)
             except OSError:
                 pass
 
--- a/mercurial/scmutil.py	Tue Oct 15 00:51:04 2013 +0900
+++ b/mercurial/scmutil.py	Tue Oct 15 00:51:04 2013 +0900
@@ -274,6 +274,9 @@
     def unlink(self, path=None):
         return util.unlink(self.join(path))
 
+    def utime(self, path=None, t=None):
+        return os.utime(self.join(path), t)
+
 class vfs(abstractvfs):
     '''Operate files relative to a base directory