author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
Fri, 07 Nov 2008 18:41:22 +0100 | |
changeset 7334 | 618140c75d8d |
parent 7333 | ee12d9dc5cbb |
child 7335 | 866d2715aff5 |
--- a/mercurial/transaction.py Fri Nov 07 15:47:01 2008 +0100 +++ b/mercurial/transaction.py Fri Nov 07 18:41:22 2008 +0100 @@ -102,7 +102,11 @@ if o: opener(f, "a").truncate(int(o)) else: - fn = opener(f).name - os.unlink(fn) + try: + fn = opener(f).name + os.unlink(fn) + except OSError, inst: + if inst.errno != errno.ENOENT: + raise os.unlink(file)