Show More
@@ -239,6 +239,14 b' def tokenize(program, lookup=None, symin' | |||
|
239 | 239 | pos += 1 |
|
240 | 240 | yield ('end', None, pos) |
|
241 | 241 | |
|
242 | def parseerrordetail(inst): | |
|
243 | """Compose error message from specified ParseError object | |
|
244 | """ | |
|
245 | if len(inst.args) > 1: | |
|
246 | return _('at %s: %s') % (inst.args[1], inst.args[0]) | |
|
247 | else: | |
|
248 | return inst.args[0] | |
|
249 | ||
|
242 | 250 | # helpers |
|
243 | 251 | |
|
244 | 252 | def getstring(x, err): |
@@ -2146,10 +2154,7 b' class revsetalias(object):' | |||
|
2146 | 2154 | # Check for placeholder injection |
|
2147 | 2155 | _checkaliasarg(self.replacement, self.args) |
|
2148 | 2156 | except error.ParseError, inst: |
|
2149 | if len(inst.args) > 1: | |
|
2150 | self.error = _('at %s: %s') % (inst.args[1], inst.args[0]) | |
|
2151 | else: | |
|
2152 | self.error = inst.args[0] | |
|
2157 | self.error = parseerrordetail(inst) | |
|
2153 | 2158 | |
|
2154 | 2159 | def _getalias(aliases, tree): |
|
2155 | 2160 | """If tree looks like an unexpanded alias, return it. Return None |
General Comments 0
You need to be logged in to leave comments.
Login now