Mercurial > hg-git
diff hggit/git_handler.py @ 756: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 | 1d94f54b3502 |
children | 1d16139b8e50 |
line wrap: on
line diff
--- a/hggit/git_handler.py Sat Aug 23 15:02:03 2014 -0400 +++ b/hggit/git_handler.py Sat Aug 30 05:48:24 2014 -0700 @@ -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 = ''