mercurial/context.py
changeset 15738 e86dd8dfdea0
parent 15707 dc3eefe0c80e
child 15818 57241845a4bb
--- a/mercurial/context.py	Tue Dec 27 21:12:09 2011 +0100
+++ b/mercurial/context.py	Wed Dec 21 18:20:15 2011 +0100
@@ -372,6 +372,12 @@
     def size(self):
         return self._filelog.size(self._filerev)
 
+    def isbinary(self):
+        try:
+            return util.binary(self.data())
+        except IOError:
+            return False
+
     def cmp(self, fctx):
         """compare with other file context