Patchwork [7,of,8] localrepo: use "vfs.setflags()" instead of "util.setflags()"

login
register
mail settings
Submitter Katsunori FUJIWARA
Date April 14, 2013, 5:23 p.m.
Message ID <f0ccfa4681e72a087184.1365960196@feefifofum>
Download mbox | patch
Permalink /patch/1299/
State Accepted, archived
Headers show

Comments

Katsunori FUJIWARA - April 14, 2013, 5:23 p.m.
# HG changeset patch
# User FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
# Date 1365956535 -32400
# Node ID f0ccfa4681e72a0871841184139322728a2ed0b8
# Parent  c21cbff6ccec91f9b3508c7cc1ff852189c003ec
localrepo: use "vfs.setflags()" instead of "util.setflags()"

Patch

diff -r c21cbff6ccec -r f0ccfa4681e7 mercurial/localrepo.py
--- a/mercurial/localrepo.py	Mon Apr 15 01:22:15 2013 +0900
+++ b/mercurial/localrepo.py	Mon Apr 15 01:22:15 2013 +0900
@@ -795,7 +795,7 @@ 
         else:
             self.wopener.write(filename, data)
             if 'x' in flags:
-                util.setflags(self.wjoin(filename), False, True)
+                self.wvfs.setflags(filename, False, True)
 
     def wwritedata(self, filename, data):
         return self._filter(self._decodefilterpats, filename, data)
diff -r c21cbff6ccec -r f0ccfa4681e7 mercurial/scmutil.py
--- a/mercurial/scmutil.py	Mon Apr 15 01:22:15 2013 +0900
+++ b/mercurial/scmutil.py	Mon Apr 15 01:22:15 2013 +0900
@@ -263,6 +263,9 @@ 
     def readlink(self, path):
         return os.readlink(self.join(path))
 
+    def setflags(self, path, l, x):
+        return util.setflags(self.join(path), l, x)
+
     def stat(self, path=None):
         return os.stat(self.join(path))