# HG changeset patch # User Nicolas Dumazet # Date 1280541873 -32400 # Node ID 58a038605a2b5f8af325c8e0be7306a7df4f6027 # Parent 52e4ac3e63f780114c5b7613fe0643b305d09789# Parent 3e561b6af81030cc27c2d22d585895bf9ca8bd47 merge crew and main diff -r 52e4ac3e63f7 -r 58a038605a2b doc/runrst --- a/doc/runrst Tue Jul 27 14:40:25 2010 -0400 +++ b/doc/runrst Sat Jul 31 11:04:33 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=[]): diff -r 52e4ac3e63f7 -r 58a038605a2b hgext/bookmarks.py --- a/hgext/bookmarks.py Tue Jul 27 14:40:25 2010 -0400 +++ b/hgext/bookmarks.py Sat Jul 31 11:04:33 2010 +0900 @@ -136,6 +136,9 @@ if "\n" in mark: raise util.Abort(_("bookmark name cannot contain newlines")) mark = mark.strip() + if not mark: + raise util.Abort(_("bookmark names cannot consist entirely of " + "whitespace")) if mark in marks and not force: raise util.Abort(_("a bookmark of the same name already exists")) if ((mark in repo.branchtags() or mark == repo.dirstate.branch()) diff -r 52e4ac3e63f7 -r 58a038605a2b hgext/mq.py --- a/hgext/mq.py Tue Jul 27 14:40:25 2010 -0400 +++ b/hgext/mq.py Sat Jul 31 11:04:33 2010 +0900 @@ -1702,7 +1702,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) diff -r 52e4ac3e63f7 -r 58a038605a2b tests/test-bookmarks --- a/tests/test-bookmarks Tue Jul 27 14:40:25 2010 -0400 +++ b/tests/test-bookmarks Sat Jul 31 11:04:33 2010 +0900 @@ -100,4 +100,7 @@ echo % revision but no bookmark name hg bookmark -r . +echo % bookmark name with whitespace only +hg bookmark ' ' + true diff -r 52e4ac3e63f7 -r 58a038605a2b tests/test-bookmarks.out --- a/tests/test-bookmarks.out Tue Jul 27 14:40:25 2010 -0400 +++ b/tests/test-bookmarks.out Sat Jul 31 11:04:33 2010 +0900 @@ -74,3 +74,5 @@ * x y 2:0316ce92851d % revision but no bookmark name abort: bookmark name required +% bookmark name with whitespace only +abort: bookmark names cannot consist entirely of whitespace diff -r 52e4ac3e63f7 -r 58a038605a2b tests/test-mq-qimport-fail-cleanup.out --- a/tests/test-mq-qimport-fail-cleanup.out Tue Jul 27 14:40:25 2010 -0400 +++ b/tests/test-mq-qimport-fail-cleanup.out Sat Jul 31 11:04:33 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 diff -r 52e4ac3e63f7 -r 58a038605a2b tests/test-mq-qimport.out --- a/tests/test-mq-qimport.out Tue Jul 27 14:40:25 2010 -0400 +++ b/tests/test-mq-qimport.out Sat Jul 31 11:04:33 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