changeset 739:e034e5196d6c

git_handler: update memfilectx creation per Mercurial changes Mercurial commit 503bb3af70fe changed the signature of the memfilectx constructor.
author Siddharth Agarwal <sid0@fb.com>
date Tue, 17 Jun 2014 12:49:33 -0700
parents 0812923b3848
children a46cd7139699
files hggit/git_handler.py
diffstat 1 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hggit/git_handler.py
+++ b/hggit/git_handler.py
@@ -817,7 +817,16 @@
                 e = fc.flags()
                 copied_path = fc.renamed()
 
-            return context.memfilectx(f, data, 'l' in e, 'x' in e, copied_path)
+            try:
+                return context.memfilectx(self.repo, f, data,
+                                          islink='l' in e,
+                                          isexec='x' in e,
+                                          copied=copied_path)
+            except TypeError:
+                return context.memfilectx(f, data,
+                                          islink='l' in e,
+                                          isexec='x' in e,
+                                          copied=copied_path)
 
         p1, p2 = (nullid, nullid)
         octopus = False