changeset 1240:57000c9b53f1

stupid: in diff_branchrev, use compat hack for filectxfn for deleted files
author Siddharth Agarwal <sid0@fb.com>
date Tue, 16 Sep 2014 16:15:17 -0700
parents f96e2495de39
children eecfbd1fac0a
files hgsubversion/stupid.py
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/stupid.py
+++ b/hgsubversion/stupid.py
@@ -342,13 +342,16 @@ def diff_branchrev(ui, svn, meta, branch
                       if f.symlink is not None)
     def filectxfn(repo, memctx, path):
         if path in files_data and files_data[path] is None:
-            raise IOError(errno.ENOENT, '%s is deleted' % path)
+            return compathacks.filectxfn_deleted(memctx, path)
 
         if path in binary_files or path in unknown_files:
             pa = path
             if branchpath:
                 pa = branchpath + '/' + path
-            data, mode = svn.get_file(pa, r.revnum)
+            try:
+                data, mode = svn.get_file(pa, r.revnum)
+            except IOError:
+                return compathacks.filectxfn_deleted_reraise(memctx)
             isexe = 'x' in mode
             islink = 'l' in mode
         else: