changeset 22054:ef0ee0c001bf

basefilectx: move isexec and islink from memfilectx This will be used in the future for creating memctx objects from other store-type objects, such as a patch store or even another context.
author Sean Farley <sean.michael.farley@gmail.com>
date Fri, 25 Jul 2014 20:11:47 -0500
parents 4354b1e35f53
children ba5fc3f81f15
files mercurial/context.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/context.py	Wed Aug 06 12:16:58 2014 -0500
+++ b/mercurial/context.py	Fri Jul 25 20:11:47 2014 -0500
@@ -714,6 +714,10 @@
             return util.binary(self.data())
         except IOError:
             return False
+    def isexec(self):
+        return 'x' in self.flags()
+    def islink(self):
+        return 'l' in self.flags()
 
     def cmp(self, fctx):
         """compare with other file context
@@ -1656,9 +1660,5 @@
         return len(self.data())
     def flags(self):
         return self._flags
-    def isexec(self):
-        return 'x' in self._flags
-    def islink(self):
-        return 'l' in self._flags
     def renamed(self):
         return self._copied