Show More
@@ -65,23 +65,23 b' def _commit(orig, ui, repo, *pats, **opt' | |||
|
65 | 65 | b"unable to parse '%s', should follow " |
|
66 | 66 | b"KEY=VALUE format" |
|
67 | 67 | ) |
|
68 |
raise error. |
|
|
68 | raise error.InputError(msg % raw) | |
|
69 | 69 | k, v = raw.split(b'=', 1) |
|
70 | 70 | if not k: |
|
71 | 71 | msg = _(b"unable to parse '%s', keys can't be empty") |
|
72 |
raise error. |
|
|
72 | raise error.InputError(msg % raw) | |
|
73 | 73 | if re.search(br'[^\w-]', k): |
|
74 | 74 | msg = _( |
|
75 | 75 | b"keys can only contain ascii letters, digits," |
|
76 | 76 | b" '_' and '-'" |
|
77 | 77 | ) |
|
78 |
raise error. |
|
|
78 | raise error.InputError(msg) | |
|
79 | 79 | if k in usedinternally: |
|
80 | 80 | msg = _( |
|
81 | 81 | b"key '%s' is used internally, can't be set " |
|
82 | 82 | b"manually" |
|
83 | 83 | ) |
|
84 |
raise error. |
|
|
84 | raise error.InputError(msg % k) | |
|
85 | 85 | inneropts['extra'][k] = v |
|
86 | 86 | return super(repoextra, self).commit(*innerpats, **inneropts) |
|
87 | 87 |
@@ -134,13 +134,13 b' Using the advanced --extra flag' | |||
|
134 | 134 | $ hg add quux |
|
135 | 135 | $ hg commit -m "adding internal used extras" --extra amend_source=hash |
|
136 | 136 | abort: key 'amend_source' is used internally, can't be set manually |
|
137 |
[ |
|
|
137 | [10] | |
|
138 | 138 | $ hg commit -m "special chars in extra" --extra id@phab=214 |
|
139 | 139 | abort: keys can only contain ascii letters, digits, '_' and '-' |
|
140 |
[ |
|
|
140 | [10] | |
|
141 | 141 | $ hg commit -m "empty key" --extra =value |
|
142 | 142 | abort: unable to parse '=value', keys can't be empty |
|
143 |
[ |
|
|
143 | [10] | |
|
144 | 144 | $ hg commit -m "adding extras" --extra sourcehash=foo --extra oldhash=bar |
|
145 | 145 | $ hg log -r . -T '{extras % "{extra}\n"}' |
|
146 | 146 | branch=default |
General Comments 0
You need to be logged in to leave comments.
Login now