comparison tests/test_single_dir_clone.py @ 531:cf4fe45bf8fd

Change all instantiations of IOError to set both errno and strerror.
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Tue, 26 Jan 2010 17:36:13 +0100
parents 89eda60c90b3
children 930bb6df19a0
comparison
equal deleted inserted replaced
530:76e9504db03b 531:cf4fe45bf8fd
1 import errno
1 import shutil 2 import shutil
2 3
3 from mercurial import commands 4 from mercurial import commands
4 from mercurial import context 5 from mercurial import context
5 from mercurial import hg 6 from mercurial import hg
88 return context.memfilectx(path=path, 89 return context.memfilectx(path=path,
89 data='foo', 90 data='foo',
90 islink=False, 91 islink=False,
91 isexec=False, 92 isexec=False,
92 copied=False) 93 copied=False)
93 raise IOError() 94 raise IOError(errno.EINVAL, 'Invalid operation: ' + path)
94 ctx = context.memctx(repo, 95 ctx = context.memctx(repo,
95 (repo['tip'].node(), node.nullid), 96 (repo['tip'].node(), node.nullid),
96 'automated test', 97 'automated test',
97 ['adding_file'], 98 ['adding_file'],
98 file_callback, 99 file_callback,
148 return context.memfilectx(path=path, 149 return context.memfilectx(path=path,
149 data=data, 150 data=data,
150 islink=False, 151 islink=False,
151 isexec=False, 152 isexec=False,
152 copied=False) 153 copied=False)
153 raise IOError() 154 raise IOError(errno.EINVAL, 'Invalid operation: ' + path)
154 return cb 155 return cb
155 156
156 def commit_to_branch(name, parent): 157 def commit_to_branch(name, parent):
157 repo.commitctx(context.memctx(repo, 158 repo.commitctx(context.memctx(repo,
158 (parent, node.nullid), 159 (parent, node.nullid),