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