mq: do not try to delete non-existent files (regression from e8e56d8377ab)
authorBenoit Boissinot <benoit.boissinot@ens-lyon.org>
Sun, 14 Mar 2010 22:17:10 +0100
changeset 10693 2c2b2d384a47
parent 10692 2a6c34b14ace
child 10694 d7732d2df54a
mq: do not try to delete non-existent files (regression from e8e56d8377ab)
hgext/mq.py
--- a/hgext/mq.py	Sun Mar 14 22:21:48 2010 +0100
+++ b/hgext/mq.py	Sun Mar 14 22:17:10 2010 +0100
@@ -1070,7 +1070,11 @@
                 # created while patching
                 for f in all_files:
                     if f not in repo.dirstate:
-                        util.unlink(repo.wjoin(f))
+                        try:
+                            util.unlink(repo.wjoin(f))
+                        except OSError, inst:
+                            if inst.errno != errno.ENOENT:
+                                raise
                 self.ui.warn(_('done\n'))
                 raise