##// END OF EJS Templates
revset: add helper function to get functions used in a revset parse tree...
Alexander Plavin -
r19720:f0b992a9 default
parent child Browse files
Show More
@@ -1941,5 +1941,16 b' def depth(tree):'
1941 1941 else:
1942 1942 return 0
1943 1943
1944 def funcsused(tree):
1945 if not isinstance(tree, tuple) or tree[0] in ('string', 'symbol'):
1946 return set()
1947 else:
1948 funcs = set()
1949 for s in tree[1:]:
1950 funcs |= funcsused(s)
1951 if tree[0] == 'func':
1952 funcs.add(tree[1][1])
1953 return funcs
1954
1944 1955 # tell hggettext to extract docstrings from these functions:
1945 1956 i18nfunctions = symbols.values()
General Comments 0
You need to be logged in to leave comments. Login now