Mercurial > hg > hg-git
comparison hggit/git_handler.py @ 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 | 1d94f54b3502 |
children | 1d16139b8e50 |
comparison
equal
deleted
inserted
replaced
756:7c7e296f8c1e | 757:0a673c9330ba |
---|---|
792 info = files.get(f) | 792 info = files.get(f) |
793 if info != None: | 793 if info != None: |
794 # it's a file reported as modified from Git | 794 # it's a file reported as modified from Git |
795 delete, mode, sha = info | 795 delete, mode, sha = info |
796 if delete: | 796 if delete: |
797 raise IOError | 797 if getattr(memctx, '_returnnoneformissingfiles', False): |
798 return None | |
799 else: # Mercurial < 3.2 | |
800 raise IOError | |
798 | 801 |
799 if not sha: # indicates there's no git counterpart | 802 if not sha: # indicates there's no git counterpart |
800 e = '' | 803 e = '' |
801 copied_path = None | 804 copied_path = None |
802 if '.hgsubstate' == f: | 805 if '.hgsubstate' == f: |