directaccess: fix with tree without order
1b28525e6698 removes order from tree, changing the indexes in gethashsymbols.
Fix that
--- a/hgext3rd/evolve/hack/directaccess.py Fri Sep 01 11:08:22 2017 +0200
+++ b/hgext3rd/evolve/hack/directaccess.py Thu Aug 31 17:00:09 2017 +0200
@@ -155,12 +155,12 @@
return []
results = []
- if len(tree) == 2 and tree[0] == "symbol":
+ if len(tree) in (2, 3) and tree[0] == "symbol":
results.append(tree[1])
elif tree[0] == "func" and tree[1] == _listtuple:
# the optimiser will group sequence of hash request
results += tree[2][1].split('\0')
- elif len(tree) >= 3:
+ elif len(tree) >= 2:
for subtree in tree[1:]:
results += gethashsymbols(subtree, maxrev)
# return directly, we don't need to filter symbols again