Show More
@@ -15,6 +15,8 b' def checkvalid(mark):' | |||||
15 | if c in mark: |
|
15 | if c in mark: | |
16 | raise util.Abort(_("bookmark '%s' contains illegal " |
|
16 | raise util.Abort(_("bookmark '%s' contains illegal " | |
17 | "character" % mark)) |
|
17 | "character" % mark)) | |
|
18 | if mark in ['tip', '.', 'null']: | |||
|
19 | raise util.Abort(_('the name \'%s\' is reserved') % mark) | |||
18 |
|
20 | |||
19 | def read(repo): |
|
21 | def read(repo): | |
20 | '''Parse .hg/bookmarks file and return a dictionary |
|
22 | '''Parse .hg/bookmarks file and return a dictionary |
@@ -222,6 +222,21 b' reject bookmark name with newline' | |||||
222 | abort: bookmark names cannot consist entirely of whitespace |
|
222 | abort: bookmark names cannot consist entirely of whitespace | |
223 | [255] |
|
223 | [255] | |
224 |
|
224 | |||
|
225 | bookmark with reserved name | |||
|
226 | ||||
|
227 | $ hg bookmark tip | |||
|
228 | abort: the name 'tip' is reserved | |||
|
229 | [255] | |||
|
230 | ||||
|
231 | $ hg bookmark . | |||
|
232 | abort: the name '.' is reserved | |||
|
233 | [255] | |||
|
234 | ||||
|
235 | $ hg bookmark null | |||
|
236 | abort: the name 'null' is reserved | |||
|
237 | [255] | |||
|
238 | ||||
|
239 | ||||
225 | bookmark with existing name |
|
240 | bookmark with existing name | |
226 |
|
241 | |||
227 | $ hg bookmark Z |
|
242 | $ hg bookmark Z |
General Comments 0
You need to be logged in to leave comments.
Login now