Show More
@@ -278,6 +278,11 b' def checknewlabel(repo, lbl, kind):' | |||||
278 | ) |
|
278 | ) | |
279 | try: |
|
279 | try: | |
280 | int(lbl) |
|
280 | int(lbl) | |
|
281 | if b'_' in lbl: | |||
|
282 | # If label contains underscores, Python might consider it an | |||
|
283 | # integer (with "_" as visual separators), but we do not. | |||
|
284 | # See PEP 515 - Underscores in Numeric Literals. | |||
|
285 | raise ValueError | |||
281 | raise error.InputError(_(b"cannot use an integer as a name")) |
|
286 | raise error.InputError(_(b"cannot use an integer as a name")) | |
282 | except ValueError: |
|
287 | except ValueError: | |
283 | pass |
|
288 | pass |
@@ -82,6 +82,11 b' trailing or leading spaces should be str' | |||||
82 | (use 'hg update' to switch to it) |
|
82 | (use 'hg update' to switch to it) | |
83 | [10] |
|
83 | [10] | |
84 |
|
84 | |||
|
85 | underscores in numeric branch names (issue6737) | |||
|
86 | ||||
|
87 | $ hg branch 2700_210 | |||
|
88 | marked working directory as branch 2700_210 | |||
|
89 | ||||
85 | verify update will accept invalid legacy branch names |
|
90 | verify update will accept invalid legacy branch names | |
86 |
|
91 | |||
87 | $ hg init test-invalid-branch-name |
|
92 | $ hg init test-invalid-branch-name |
General Comments 0
You need to be logged in to leave comments.
Login now