diff -r 551aa6e27929 -r 1634287b6ab1 hgext/mq.py --- a/hgext/mq.py Fri Oct 29 12:50:08 2010 +0200 +++ b/hgext/mq.py Fri Oct 29 15:25:21 2010 +0200 @@ -839,8 +839,12 @@ insert = self.full_series_end() wlock = repo.wlock() try: - # if patch file write fails, abort early - p = self.opener(patchfn, "w") + try: + # if patch file write fails, abort early + p = self.opener(patchfn, "w") + except IOError, e: + raise util.Abort(_('cannot write patch "%s": %s') + % (patchfn, e.strerror)) try: if self.plainmode: if user: