Show More
@@ -1580,6 +1580,15 b' def _list(repo, subset, x):' | |||
|
1580 | 1580 | s = subset.set() |
|
1581 | 1581 | return baseset([r for r in ls if r in s]) |
|
1582 | 1582 | |
|
1583 | # for internal use | |
|
1584 | def _intlist(repo, subset, x): | |
|
1585 | s = getstring(x, "internal error") | |
|
1586 | if not s: | |
|
1587 | return baseset([]) | |
|
1588 | ls = [int(r) for r in s.split('\0')] | |
|
1589 | s = subset.set() | |
|
1590 | return baseset([r for r in ls if r in s]) | |
|
1591 | ||
|
1583 | 1592 | symbols = { |
|
1584 | 1593 | "adds": adds, |
|
1585 | 1594 | "all": getall, |
@@ -1647,6 +1656,7 b' symbols = {' | |||
|
1647 | 1656 | "user": user, |
|
1648 | 1657 | "unstable": unstable, |
|
1649 | 1658 | "_list": _list, |
|
1659 | "_intlist": _intlist, | |
|
1650 | 1660 | } |
|
1651 | 1661 | |
|
1652 | 1662 | # symbols which can't be used for a DoS attack for any given input |
@@ -1717,6 +1727,7 b' safesymbols = set([' | |||
|
1717 | 1727 | "user", |
|
1718 | 1728 | "unstable", |
|
1719 | 1729 | "_list", |
|
1730 | "_intlist", | |
|
1720 | 1731 | ]) |
|
1721 | 1732 | |
|
1722 | 1733 | methods = { |
@@ -2023,7 +2034,7 b' def formatspec(expr, *args):' | |||
|
2023 | 2034 | elif l == 1: |
|
2024 | 2035 | return argtype(t, s[0]) |
|
2025 | 2036 | elif t == 'd': |
|
2026 | return "_list('%s')" % "\0".join(str(int(a)) for a in s) | |
|
2037 | return "_intlist('%s')" % "\0".join(str(int(a)) for a in s) | |
|
2027 | 2038 | elif t == 's': |
|
2028 | 2039 | return "_list('%s')" % "\0".join(s) |
|
2029 | 2040 | elif t == 'n': |
General Comments 0
You need to be logged in to leave comments.
Login now