Mercurial > public > mercurial-scm > hg
diff mercurial/revsetlang.py @ 35561:4c3a4bb31c0e
revsetlang: raise ParseError to report invalid format character
It's more common in revset and templater than raising Abort.
I have a couple more patches to address exceptions caused by bad format string
passed to revset() template function.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 01 Apr 2017 17:12:48 +0900 |
parents | 3a8810c1b9bc |
children | 8f1a7adb3225 |
line wrap: on
line diff
--- a/mercurial/revsetlang.py Sat Apr 01 17:04:49 2017 +0900 +++ b/mercurial/revsetlang.py Sat Apr 01 17:12:48 2017 +0900 @@ -641,7 +641,8 @@ d = expr[pos] ret.append(listexp(list(next(argiter)), d)) else: - raise error.Abort(_('unexpected revspec format character %s') % d) + raise error.ParseError(_('unexpected revspec format character %s') + % d) pos += 1 return ''.join(ret)