diff -r 9a99224a6409 -r 6d42c797ca6e mercurial/patch.py --- a/mercurial/patch.py Tue May 29 18:27:12 2012 +0300 +++ b/mercurial/patch.py Fri Jun 01 17:37:56 2012 +0200 @@ -1343,8 +1343,17 @@ elif state == 'git': for gp in values: path = pstrip(gp.oldpath) - data, mode = backend.getfile(path) - store.setfile(path, data, mode) + try: + data, mode = backend.getfile(path) + except IOError, e: + if e.errno != errno.ENOENT: + raise + # The error ignored here will trigger a getfile() + # error in a place more appropriate for error + # handling, and will not interrupt the patching + # process. + else: + store.setfile(path, data, mode) else: raise util.Abort(_('unsupported parser state: %s') % state)