changeset 1020:d356f8479295

overlayfilectx: provide an isbinary() method Upstream hg (e62cf13e0858) now requires isbinary() from a filecontext. hg-git's overlayfilectx needs to be updated accordingly.
author Jun Wu <quark@fb.com>
date Fri, 12 May 2017 13:14:21 -0700
parents 715cbf3fa24c
children f2118a7dd764
files hggit/overlay.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hggit/overlay.py
+++ b/hggit/overlay.py
@@ -198,6 +198,9 @@
         blob = self.repo.handler.git.get_object(_maybehex(self.fileid))
         return blob.data
 
+    def isbinary(self):
+        return util.binary(self.data())
+
 class overlaychangectx(context.changectx):
     def __init__(self, repo, sha):
         self.repo = repo