changeset 12616:e797fdf91df4

revset: lower precedence of minus infix (issue2361)
author Matt Mackall <mpm@selenic.com>
date Thu, 07 Oct 2010 11:45:17 -0500
parents 64db820c66a2
children 2063d36b406e
files mercurial/revset.py tests/test-revset.t
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revset.py	Tue Oct 05 20:25:51 2010 +0200
+++ b/mercurial/revset.py	Thu Oct 07 11:45:17 2010 -0500
@@ -12,7 +12,7 @@
 
 elements = {
     "(": (20, ("group", 1, ")"), ("func", 1, ")")),
-    "-": (19, ("negate", 19), ("minus", 19)),
+    "-": (5, ("negate", 19), ("minus", 5)),
     "::": (17, ("dagrangepre", 17), ("dagrange", 17),
            ("dagrangepost", 17)),
     "..": (17, ("dagrangepre", 17), ("dagrange", 17),
--- a/tests/test-revset.t	Tue Oct 05 20:25:51 2010 +0200
+++ b/tests/test-revset.t	Thu Oct 07 11:45:17 2010 -0500
@@ -327,3 +327,5 @@
   2
   1
   0
+  $ log '4::8 - 8'
+  4