mercurial/commands.py
changeset 17814 f88ca484c3e9
parent 17809 a7462ca7f75e
child 17817 b17be267b59c
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