Mercurial > public > mercurial-scm > hg-stable
diff mercurial/revset.py @ 25819:be29d26e2949
revset: parse nullary ":" operator as "0:tip"
This is necessary for compatibility with the old-style parser that will be
removed by future patches.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 05 Jul 2015 12:15:54 +0900 |
parents | e71e5629e006 |
children | 5214cbdc37e5 4f703dcc626f |
line wrap: on
line diff
--- a/mercurial/revset.py Mon Jul 06 22:01:41 2015 +0900 +++ b/mercurial/revset.py Sun Jul 05 12:15:54 2015 +0900 @@ -125,7 +125,7 @@ ("dagrangepost", 17)), "..": (17, None, ("dagrangepre", 17), ("dagrange", 17), ("dagrangepost", 17)), - ":": (15, None, ("rangepre", 15), ("range", 15), ("rangepost", 15)), + ":": (15, "rangeall", ("rangepre", 15), ("range", 15), ("rangepost", 15)), "not": (10, None, ("not", 10), None, None), "!": (10, None, ("not", 10), None, None), "and": (5, None, None, ("and", 5), None), @@ -2227,6 +2227,8 @@ return optimize(('func', ('symbol', 'ancestors'), x[1]), small) elif op == 'dagrangepost': return optimize(('func', ('symbol', 'descendants'), x[1]), small) + elif op == 'rangeall': + return optimize(('range', ('string', '0'), ('string', 'tip')), small) elif op == 'rangepre': return optimize(('range', ('string', '0'), x[1]), small) elif op == 'rangepost':