Sun, 26 Jun 2016 18:17:12 +0900 revset: fix order of nested 'or' expression (BC)
Yuya Nishihara <yuya@tcha.org> [Sun, 26 Jun 2016 18:17:12 +0900] rev 29938
revset: fix order of nested 'or' expression (BC) This fixes the order of 'x & (y + z)' where 'y' and 'z' are not trivial. The follow-order 'or' operation is slower than the ordered operation if an input set is large: #0 #1 #2 #3 0) 0.002968 0.002980 0.002982 0.073042 1) 0.004513 0.004485 0.012029 0.075261 #0: 0:4000 & (0:1099 + 1000:2099 + 2000:3099) #1: 4000:0 & (0:1099 + 1000:2099 + 2000:3099) #2: 10000:0 & (0:1099 + 1000:2099 + 2000:3099) #3: file("path:hg") & (0:1099 + 1000:2099 + 2000:3099) I've tried another implementation, but which appeared to be slower than this version. ss = [getset(repo, fullreposet(repo), x) for x in xs] return subset.filter(lambda r: any(r in s for s in ss), cache=False)
Sun, 07 Aug 2016 17:58:50 +0900 revset: add 'takeorder' attribute to mark functions that need ordering flag
Yuya Nishihara <yuya@tcha.org> [Sun, 07 Aug 2016 17:58:50 +0900] rev 29937
revset: add 'takeorder' attribute to mark functions that need ordering flag Since most functions shouldn't need 'order' flag, it is passed only when explicitly required. This avoids large API breakage.
Sun, 07 Aug 2016 17:46:12 +0900 revset: pass around ordering flags to operations
Yuya Nishihara <yuya@tcha.org> [Sun, 07 Aug 2016 17:46:12 +0900] rev 29936
revset: pass around ordering flags to operations Some operations and functions will need them to fix ordering bugs.
Sun, 07 Aug 2016 17:48:52 +0900 revset: add stub to handle parentpost operation
Yuya Nishihara <yuya@tcha.org> [Sun, 07 Aug 2016 17:48:52 +0900] rev 29935
revset: add stub to handle parentpost operation All operations will take 'order' flag, but p1() function won't.
Tue, 16 Feb 2016 22:02:16 +0900 revset: infer ordering flag to teach if operation should define/follow order
Yuya Nishihara <yuya@tcha.org> [Tue, 16 Feb 2016 22:02:16 +0900] rev 29934
revset: infer ordering flag to teach if operation should define/follow order New flag 'order' is the hint to determine if a function or operation can enforce its ordering requirement or take the ordering already defined. It will be used to fix a couple of ordering bugs, such as: a) 'x & (y | z)' disregards the order of 'x' (issue5100) b) 'x & y:z' is listed from 'y' to 'z' c) 'x & y' can be rewritten as 'y & x' if weight(x) > weight(y) (a) and (b) are bugs of the revset core. Before this, there was no way to tell if 'orset()' and 'rangeset()' can enforce its ordering. These bugs could be addressed by overriding __and__() of the initial set to take the ordering of the other set: class fullreposet: def __and__(self, other): # allow other to enforce its ordering return other but it would expose (c), which is a hidden bug of optimize(). So, in either ways, optimize() have to know the current ordering requirement. Otherwise, it couldn't rewrite expressions by weights with no output change, nor tell how a revset function or operation should order the entries. 'order' is tri-state. It starts with 'define', and shifts to 'follow' by 'x & y'. It changes back to 'define' on function call 'f(x)' or function-like operation 'x (f) y' because 'f' may have its own ordering requirement for 'x' and 'y'. The state 'any' will allow us to avoid extra cost that would be necessary to constrain ordering where it isn't important, 'not x'.
Sun, 07 Aug 2016 17:04:05 +0900 revset: wrap arguments of 'or' by 'list' node
Yuya Nishihara <yuya@tcha.org> [Sun, 07 Aug 2016 17:04:05 +0900] rev 29933
revset: wrap arguments of 'or' by 'list' node This makes the number of 'or' arguments deterministic so we can attach additional ordering flag to all operator nodes. See the next patch. We rewrite the tree immediately after chained 'or' operations are flattened by simplifyinfixops(), so we don't need to care if arguments are stored in x[1] or x[1:].
(0) -10000 -3000 -1000 -300 -100 -30 -10 -6 +6 +10 +30 +100 +300 +1000 +3000 +10000 tip