changeset 10693:2c2b2d384a47

mq: do not try to delete non-existent files (regression from e8e56d8377ab)
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Sun, 14 Mar 2010 22:17:10 +0100
parents 2a6c34b14ace
children d7732d2df54a
files hgext/mq.py
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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