Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 17814:f88ca484c3e9
bookmarks: remove redundant check for newline
New bookmarks are already checked for illegal characters (':', '\0',
'\n', and '\r') in bookmarks.valid().
author | Kevin Bullock <kbullock@ringworld.org> |
---|---|
date | Wed, 17 Oct 2012 16:23:42 -0500 |
parents | a7462ca7f75e |
children | b17be267b59c |
comparison
equal
deleted
inserted
replaced
17813:813db1dccc05 | 17814:f88ca484c3e9 |
---|---|
788 hexfn = ui.debugflag and hex or short | 788 hexfn = ui.debugflag and hex or short |
789 marks = repo._bookmarks | 789 marks = repo._bookmarks |
790 cur = repo.changectx('.').node() | 790 cur = repo.changectx('.').node() |
791 | 791 |
792 def checkformat(mark): | 792 def checkformat(mark): |
793 if "\n" in mark: | |
794 raise util.Abort(_("bookmark name cannot contain newlines")) | |
795 mark = mark.strip() | 793 mark = mark.strip() |
796 if not mark: | 794 if not mark: |
797 raise util.Abort(_("bookmark names cannot consist entirely of " | 795 raise util.Abort(_("bookmark names cannot consist entirely of " |
798 "whitespace")) | 796 "whitespace")) |
799 return mark | 797 return mark |