Patchwork [7,of,9] context: use "vfs.lstat()" instead of "os.lstat()"

login
register
mail settings
Submitter Katsunori FUJIWARA
Date Oct. 14, 2013, 4:16 p.m.
Message ID <8dc8f40fa668af56f754.1381767367@juju>
Download mbox | patch
Permalink /patch/2765/
State Accepted
Commit 7c21e3398931acaebb200622f5385d1dea1351b1
Headers show

Comments

Katsunori FUJIWARA - Oct. 14, 2013, 4:16 p.m.
# HG changeset patch
# User FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
# Date 1381765864 -32400
#      Tue Oct 15 00:51:04 2013 +0900
# Node ID 8dc8f40fa668af56f75491aef75e3aec48bca477
# Parent  799f7b70736b5b2479e028460ab08cf6233eb356
context: use "vfs.lstat()" instead of "os.lstat()"

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -1248,11 +1248,11 @@ 
         return rp, self._changectx._parents[0]._manifest.get(rp, nullid)
 
     def size(self):
-        return os.lstat(self._repo.wjoin(self._path)).st_size
+        return self._repo.wvfs.lstat(self._path).st_size
     def date(self):
         t, tz = self._changectx.date()
         try:
-            return (int(os.lstat(self._repo.wjoin(self._path)).st_mtime), tz)
+            return (int(self._repo.wvfs.lstat(self._path).st_mtime), tz)
         except OSError, err:
             if err.errno != errno.ENOENT:
                 raise