diff -r 11d1a9143adb -r 242d2f4ec01c mercurial/patch.py --- a/mercurial/patch.py Fri Dec 28 11:55:45 2012 +0100 +++ b/mercurial/patch.py Fri Dec 28 11:55:57 2012 +0100 @@ -439,11 +439,7 @@ util.setflags(self._join(fname), False, True) def unlink(self, fname): - try: - util.unlinkpath(self._join(fname)) - except OSError, inst: - if inst.errno != errno.ENOENT: - raise + util.unlinkpath(self._join(fname), ignoremissing=True) def writerej(self, fname, failed, total, lines): fname = fname + ".rej"