# HG changeset patch # User Mads Kiilerich # Date 1355009121 -3600 # Node ID 6f62e005781dd6e410b4a9f47ec96c583d59a792 # Parent abe9799a86d6666c0542781d7a591f1ad1544e3f mq: don't fail when removing a patch without patch file from series file diff -r abe9799a86d6 -r 6f62e005781d hgext/mq.py --- a/hgext/mq.py Thu Dec 13 19:19:06 2012 +0100 +++ b/hgext/mq.py Sun Dec 09 00:25:21 2012 +0100 @@ -827,7 +827,11 @@ if r: r[None].forget(patches) for p in patches: - os.unlink(self.join(p)) + try: + os.unlink(self.join(p)) + except OSError, inst: + if inst.errno != errno.ENOENT: + raise qfinished = [] if numrevs: diff -r abe9799a86d6 -r 6f62e005781d tests/test-mq.t --- a/tests/test-mq.t Thu Dec 13 19:19:06 2012 +0100 +++ b/tests/test-mq.t Sun Dec 09 00:25:21 2012 +0100 @@ -1110,8 +1110,14 @@ $ hg qpop popping baz now at: bar + +test qdel/qrm + $ hg qdel baz - + $ echo p >> .hg/patches/series + $ hg qrm p + $ hg qser + bar create a git patch