mercurial/util.py
changeset 9112 54eb3782d32f
parent 9102 bbc78cb1bf15
child 9155 b46063eabe98
--- a/mercurial/util.py	Fri Jul 10 23:24:35 2009 +0200
+++ b/mercurial/util.py	Fri Jul 10 17:54:04 2009 +0200
@@ -842,11 +842,9 @@
             self.audit_path = always
         self.createmode = None
 
-    def __getattr__(self, name):
-        if name == '_can_symlink':
-            self._can_symlink = checklink(self.base)
-            return self._can_symlink
-        raise AttributeError(name)
+    @propertycache
+    def _can_symlink(self):
+        return checklink(self.base)
 
     def _fixfilemode(self, name):
         if self.createmode is None: