comparison tests/test_util.py @ 1238:339b5703000c

test_util: use compat hack for filectxfn for deleted files
author Siddharth Agarwal <sid0@fb.com>
date Tue, 16 Sep 2014 16:02:44 -0700
parents d3c79072bc6a
children 260212f056b7
comparison
equal deleted inserted replaced
1237:4ed0855d211f 1238:339b5703000c
665 else: 665 else:
666 changed.append(dest) 666 changed.append(dest)
667 667
668 def filectxfn(repo, memctx, path): 668 def filectxfn(repo, memctx, path):
669 if path in removed: 669 if path in removed:
670 raise IOError(errno.ENOENT, 670 return compathacks.filectxfn_deleted(memctx, path)
671 "File \"%s\" no longer exists" % path)
672 entry = [e for e in changes if path == e[1]][0] 671 entry = [e for e in changes if path == e[1]][0]
673 source, dest, newdata = entry 672 source, dest, newdata = entry
674 if newdata is None: 673 if newdata is None:
675 newdata = parentctx[source].data() 674 newdata = parentctx[source].data()
676 copied = None 675 copied = None