# HG changeset patch # User Kevin Bullock # Date 2012-10-17 21:23:42 # Node ID f88ca484c3e9187ed966542ddeeffde59008fee2 # Parent 813db1dccc052ad35f89feab4730ee8bfc54cc10 bookmarks: remove redundant check for newline New bookmarks are already checked for illegal characters (':', '\0', '\n', and '\r') in bookmarks.valid(). diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -790,8 +790,6 @@ def bookmark(ui, repo, mark=None, rev=No cur = repo.changectx('.').node() def checkformat(mark): - 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 " diff --git a/tests/test-bookmarks.t b/tests/test-bookmarks.t --- a/tests/test-bookmarks.t +++ b/tests/test-bookmarks.t @@ -214,12 +214,12 @@ reject bookmark name with newline $ hg bookmark ' > ' - abort: bookmark name cannot contain newlines + abort: bookmark names cannot consist entirely of whitespace [255] $ hg bookmark -m Z ' > ' - abort: bookmark name cannot contain newlines + abort: bookmark names cannot consist entirely of whitespace [255] bookmark with existing name