diff mercurial/scmutil.py @ 18206:2c1276825e93

merge with stable
author Matt Mackall <mpm@selenic.com>
date Wed, 02 Jan 2013 00:24:28 -0600
parents 203b7a759218 f9a89bdd64a6
children c38a62af000e
line wrap: on
line diff
--- a/mercurial/scmutil.py	Thu Dec 20 19:22:12 2012 +0100
+++ b/mercurial/scmutil.py	Wed Jan 02 00:24:28 2013 -0600
@@ -262,8 +262,12 @@
     def _cansymlink(self):
         return util.checklink(self.base)
 
+    @util.propertycache
+    def _chmod(self):
+        return util.checkexec(self.base)
+
     def _fixfilemode(self, name):
-        if self.createmode is None:
+        if self.createmode is None or not self._chmod:
             return
         os.chmod(name, self.createmode & 0666)