changeset 7334:618140c75d8d

fix restart of interrupted recover Ignore missing files if they are already removed. Thanks maelcum on IRC for reporting it.
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Fri, 07 Nov 2008 18:41:22 +0100
parents ee12d9dc5cbb
children 866d2715aff5
files mercurial/transaction.py
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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)