Show More
@@ -249,13 +249,11 b' def andset(repo, subset, x, y):' | |||
|
249 | 249 | |
|
250 | 250 | def orset(repo, subset, x, y): |
|
251 | 251 | xl = getset(repo, subset, x) |
|
252 | s = xl.set() | |
|
253 | yl = getset(repo, baseset([r for r in subset if r not in s]), y) | |
|
252 | yl = getset(repo, subset - xl, y) | |
|
254 | 253 | return baseset(xl + yl) |
|
255 | 254 | |
|
256 | 255 | def notset(repo, subset, x): |
|
257 |
|
|
|
258 | return baseset([r for r in subset if r not in s]) | |
|
256 | return subset - getset(repo, subset, x) | |
|
259 | 257 | |
|
260 | 258 | def listset(repo, subset, a, b): |
|
261 | 259 | raise error.ParseError(_("can't use a list in this context")) |
@@ -912,9 +910,9 b' def heads(repo, subset, x):' | |||
|
912 | 910 | """``heads(set)`` |
|
913 | 911 | Members of set with no children in set. |
|
914 | 912 | """ |
|
915 |
s = getset(repo, subset, x) |
|
|
916 |
ps = parents(repo, subset, x) |
|
|
917 | return baseset([r for r in s if r not in ps]) | |
|
913 | s = getset(repo, subset, x) | |
|
914 | ps = parents(repo, subset, x) | |
|
915 | return s - ps | |
|
918 | 916 | |
|
919 | 917 | def hidden(repo, subset, x): |
|
920 | 918 | """``hidden()`` |
@@ -1400,7 +1398,7 b' def roots(repo, subset, x):' | |||
|
1400 | 1398 | s = getset(repo, baseset(repo.changelog), x).set() |
|
1401 | 1399 | subset = baseset([r for r in subset if r in s]) |
|
1402 | 1400 | cs = _children(repo, subset, s) |
|
1403 | return baseset([r for r in subset if r not in cs]) | |
|
1401 | return subset - cs | |
|
1404 | 1402 | |
|
1405 | 1403 | def secret(repo, subset, x): |
|
1406 | 1404 | """``secret()`` |
@@ -2069,5 +2067,12 b' class baseset(list):' | |||
|
2069 | 2067 | self._set = set(self) |
|
2070 | 2068 | return self._set |
|
2071 | 2069 | |
|
2070 | def __sub__(self, x): | |
|
2071 | if isinstance(x, baseset): | |
|
2072 | s = x.set() | |
|
2073 | else: | |
|
2074 | s = set(x) | |
|
2075 | return baseset(self.set() - s) | |
|
2076 | ||
|
2072 | 2077 | # tell hggettext to extract docstrings from these functions: |
|
2073 | 2078 | i18nfunctions = symbols.values() |
General Comments 0
You need to be logged in to leave comments.
Login now