# HG changeset patch # User Sean Farley # Date 2013-08-12 03:56:30 # Node ID a92302f48a56b942b82c9d92d52407d49591e497 # Parent 018ee491a6bec6ebe4b3c71a19072e95cdca5234 basefilectx: move isbinary from filectx diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -517,6 +517,12 @@ class basefilectx(object): 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.""" @@ -577,12 +583,6 @@ class filectx(basefilectx): 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