comparison tests/test_push_command.py @ 1239:f96e2495de39

test_push_command: use compat hack for filectxfn for deleted files
author Siddharth Agarwal <sid0@fb.com>
date Tue, 16 Sep 2014 16:03:31 -0700
parents f367a4462191
children a36e87ae2380
comparison
equal deleted inserted replaced
1238:339b5703000c 1239:f96e2495de39
371 self.assertNotEqual(oldnode, self.repo['tip'].hex(), 'Revision was not pushed.') 371 self.assertNotEqual(oldnode, self.repo['tip'].hex(), 'Revision was not pushed.')
372 372
373 def test_delete_file(self): 373 def test_delete_file(self):
374 repo = self.repo 374 repo = self.repo
375 def file_callback(repo, memctx, path): 375 def file_callback(repo, memctx, path):
376 raise IOError(errno.ENOENT, '%s is deleted' % path) 376 return compathacks.filectxfn_deleted(memctx, path)
377 old_files = set(repo['default'].manifest().keys()) 377 old_files = set(repo['default'].manifest().keys())
378 ctx = context.memctx(repo, 378 ctx = context.memctx(repo,
379 (repo['default'].node(), node.nullid), 379 (repo['default'].node(), node.nullid),
380 'automated test', 380 'automated test',
381 ['alpha'], 381 ['alpha'],