Comments
Patch
@@ -515,10 +515,16 @@
return self._changectx
def path(self):
return self._path
+ def isbinary(self):
+ try:
+ return util.binary(self.data())
+ except IOError:
+ return False
+
class filectx(basefilectx):
"""A filecontext object makes access to data related to a particular
filerevision convenient."""
def __init__(self, repo, path, changeid=None, fileid=None,
filelog=None, changectx=None):
@@ -575,16 +581,10 @@
def data(self):
return self._filelog.read(self._filenode)
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
returns True if different than fctx.
"""