changeset 757:0a673c9330ba

git_handler: fix filectxfn compatibility with hg's default branch Mercurial rev 650b5b6e75ed changed the contract for filectxfn, and rev d226fe36e362 added a way for us to detect the change.
author Siddharth Agarwal <sid0@fb.com>
date Sat, 30 Aug 2014 05:48:24 -0700
parents 7c7e296f8c1e
children 8d55f839f13a
files hggit/git_handler.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hggit/git_handler.py
+++ b/hggit/git_handler.py
@@ -794,7 +794,10 @@
                 # it's a file reported as modified from Git
                 delete, mode, sha = info
                 if delete:
-                    raise IOError
+                    if getattr(memctx, '_returnnoneformissingfiles', False):
+                        return None
+                    else:  # Mercurial < 3.2
+                        raise IOError
 
                 if not sha: # indicates there's no git counterpart
                     e = ''