hgext/mq.py
branchstable
changeset 12878 1634287b6ab1
parent 12875 b59b5193d4d0
child 12879 da4a9ed369c8
--- 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: