changeset 11714:aae1dd12fce6

merge with stable
author Nicolas Dumazet <nicdumz.commits@gmail.com>
date Sat, 31 Jul 2010 11:41:58 +0900
parents 57a8894e3f75 (current diff) 9cbc62f68328 (diff)
children a286a4ecbfeb
files hgext/mq.py mercurial/dispatch.py tests/test-mq-qimport.out
diffstat 5 files changed, 12 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/doc/runrst	Sat Jul 31 11:41:42 2010 +0900
+++ b/doc/runrst	Sat Jul 31 11:41:58 2010 +0900
@@ -13,9 +13,14 @@
 """
 
 import sys
-from docutils.parsers.rst import roles
-from docutils.core import publish_cmdline
-from docutils import nodes, utils
+try:
+    from docutils.parsers.rst import roles
+    from docutils.core import publish_cmdline
+    from docutils import nodes, utils
+except ImportError:
+    sys.stderr.write("abort: couldn't generate documentation: docutils "
+                     "module is missing\n")
+    sys.exit(-1)
 
 def role_hg(name, rawtext, text, lineno, inliner,
             options={}, content=[]):
--- a/hgext/mq.py	Sat Jul 31 11:41:42 2010 +0900
+++ b/hgext/mq.py	Sat Jul 31 11:41:58 2010 +0900
@@ -1713,7 +1713,7 @@
                     else:
                         text = url.open(self.ui, filename).read()
                 except (OSError, IOError):
-                    raise util.Abort(_("unable to read %s") % filename)
+                    raise util.Abort(_("unable to read file %s") % filename)
                 if not patchname:
                     patchname = normname(os.path.basename(filename))
                 self.check_reserved_name(patchname)
--- a/mercurial/dispatch.py	Sat Jul 31 11:41:42 2010 +0900
+++ b/mercurial/dispatch.py	Sat Jul 31 11:41:58 2010 +0900
@@ -395,7 +395,7 @@
     try:
         wd = os.getcwd()
     except OSError, e:
-        raise util.Abort(_("error getting current working directory: %s") % 
+        raise util.Abort(_("error getting current working directory: %s") %
                          e.strerror)
     path = cmdutil.findrepo(wd) or ""
     if not path:
--- a/tests/test-mq-qimport-fail-cleanup.out	Sat Jul 31 11:41:42 2010 +0900
+++ b/tests/test-mq-qimport-fail-cleanup.out	Sat Jul 31 11:41:58 2010 +0900
@@ -4,7 +4,7 @@
 
 #qimport valid patch followed by invalid patch
 adding b.patch to series file
-abort: unable to read fakepatch
+abort: unable to read file fakepatch
 
 #valid patches before fail added to series
 b.patch
--- a/tests/test-mq-qimport.out	Sat Jul 31 11:41:42 2010 +0900
+++ b/tests/test-mq-qimport.out	Sat Jul 31 11:41:58 2010 +0900
@@ -1,5 +1,5 @@
 % qimport non-existing-file
-abort: unable to read non-existing-file
+abort: unable to read file non-existing-file
 % import email
 adding email to series file
 applying email