changeset 17818 | 5023027240a1 |
parent 17817 | b17be267b59c |
child 17821 | 361ab1e2086f |
--- a/mercurial/commands.py Wed Oct 17 16:34:46 2012 -0500 +++ b/mercurial/commands.py Wed Oct 17 17:23:39 2012 -0500 @@ -794,6 +794,11 @@ if not mark: raise util.Abort(_("bookmark names cannot consist entirely of " "whitespace")) + for c in (':', '\0', '\n', '\r'): + if c in mark: + raise util.Abort(_("bookmark '%s' contains illegal " + "character" % mark)) + scmutil.checknewlabel(repo, mark) return mark def checkconflict(repo, mark, force=False):