diff -r c547e1acc37c -r 361ab1e2086f mercurial/commands.py --- a/mercurial/commands.py Wed Oct 17 21:39:07 2012 -0500 +++ b/mercurial/commands.py Wed Oct 17 21:42:06 2012 -0500 @@ -794,11 +794,7 @@ 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) + scmutil.checknewlabel(repo, mark, 'bookmark') return mark def checkconflict(repo, mark, force=False): @@ -5645,7 +5641,7 @@ if len(names) != len(set(names)): raise util.Abort(_('tag names must be unique')) for n in names: - scmutil.checknewlabel(repo, n) + scmutil.checknewlabel(repo, n, 'tag') if not n: raise util.Abort(_('tag names cannot consist entirely of ' 'whitespace'))