mercurial/bookmarks.py
changeset 17818 5023027240a1
parent 17816 19388ba75a06
child 17826 46e1a4e24225
--- a/mercurial/bookmarks.py	Wed Oct 17 16:34:46 2012 -0500
+++ b/mercurial/bookmarks.py	Wed Oct 17 17:23:39 2012 -0500
@@ -10,14 +10,6 @@
 from mercurial import encoding, error, util, obsolete, phases
 import errno, os
 
-def checkvalid(mark):
-    for c in (':', '\0', '\n', '\r'):
-        if c in mark:
-            raise util.Abort(_("bookmark '%s' contains illegal "
-                "character" % mark))
-    if mark in ['tip', '.', 'null']:
-        raise util.Abort(_('the name \'%s\' is reserved') % mark)
-
 def read(repo):
     '''Parse .hg/bookmarks file and return a dictionary
 
@@ -81,8 +73,6 @@
 
     if repo._bookmarkcurrent not in refs:
         setcurrent(repo, None)
-    for mark in refs.keys():
-        checkvalid(mark)
 
     wlock = repo.wlock()
     try:
@@ -113,7 +103,6 @@
 
     if mark not in repo._bookmarks:
         mark = ''
-    checkvalid(mark)
 
     wlock = repo.wlock()
     try: