diff tests/test_push_command.py @ 557:d74bf020a61c

replay/stupid: raise the correct errno in IOError to fix hg >= e553a425751d Basically, all the IOErrors we ever raise inside a file commit function that is sent to commitctx should be ENOENT. This suggests a change should be made in commitctx to not overload IOError.
author Augie Fackler <durin42@gmail.com>
date Sun, 14 Feb 2010 14:04:56 -0600
parents 8522f8ef799e
children d96aa92d9ad9
line wrap: on
line diff
--- a/tests/test_push_command.py
+++ b/tests/test_push_command.py
@@ -55,7 +55,7 @@ class PushTests(test_util.TestBase):
         repo = self.repo
         def file_callback(repo, memctx, path):
             return context.memfilectx(
-                path=path, data='foo', islink=False, 
+                path=path, data='foo', islink=False,
                 isexec=False, copied=False)
         ctx = context.memctx(repo,
                              (repo['default'].node(), node.nullid),
@@ -302,7 +302,7 @@ class PushTests(test_util.TestBase):
     def test_delete_file(self):
         repo = self.repo
         def file_callback(repo, memctx, path):
-            raise IOError(errno.EBADF, 'Operation on deleted file attempted')
+            raise IOError(errno.ENOENT, '%s is deleted' % path)
         old_files = set(repo['default'].manifest().keys())
         ctx = context.memctx(repo,
                              (repo['default'].node(), node.nullid),