Sun, 09 Aug 2015 16:09:41 +0900 revset: prevent crash caused by empty group expression while optimizing "or" stable
Yuya Nishihara <yuya@tcha.org> [Sun, 09 Aug 2015 16:09:41 +0900] rev 25996
revset: prevent crash caused by empty group expression while optimizing "or" An empty group expression "()" generates None in AST, so it should be tested before destructuring a tuple. "A | ()" is still evaluated to an error because I'm not sure whether "()" represents an empty set or an empty expression (= a unit value). They are identical in "or" operation, but they should be evaluated differently in "and" operation. expression empty set unit value ---------- --------- ---------- () {} A A & () {} A A | () A A
Sun, 09 Aug 2015 16:06:36 +0900 revset: prevent crash caused by empty group expression while optimizing "and" stable
Yuya Nishihara <yuya@tcha.org> [Sun, 09 Aug 2015 16:06:36 +0900] rev 25995
revset: prevent crash caused by empty group expression while optimizing "and" An empty group expression "()" generates None in AST, so the optimizer have to test it before destructuring a tuple. The error message, "missing argument", is somewhat obscure, but it should be better than crash.
(0) -10000 -3000 -1000 -300 -100 -30 -10 -2 +2 +10 +30 +100 +300 +1000 +3000 +10000 tip