247 def andset(repo, subset, x, y): |
247 def andset(repo, subset, x, y): |
248 return getset(repo, getset(repo, subset, x), y) |
248 return getset(repo, getset(repo, subset, x), y) |
249 |
249 |
250 def orset(repo, subset, x, y): |
250 def orset(repo, subset, x, y): |
251 xl = getset(repo, subset, x) |
251 xl = getset(repo, subset, x) |
252 s = xl.set() |
252 yl = getset(repo, subset - xl, y) |
253 yl = getset(repo, baseset([r for r in subset if r not in s]), y) |
|
254 return baseset(xl + yl) |
253 return baseset(xl + yl) |
255 |
254 |
256 def notset(repo, subset, x): |
255 def notset(repo, subset, x): |
257 s = getset(repo, subset, x).set() |
256 return subset - getset(repo, subset, x) |
258 return baseset([r for r in subset if r not in s]) |
|
259 |
257 |
260 def listset(repo, subset, a, b): |
258 def listset(repo, subset, a, b): |
261 raise error.ParseError(_("can't use a list in this context")) |
259 raise error.ParseError(_("can't use a list in this context")) |
262 |
260 |
263 def func(repo, subset, a, b): |
261 def func(repo, subset, a, b): |
910 |
908 |
911 def heads(repo, subset, x): |
909 def heads(repo, subset, x): |
912 """``heads(set)`` |
910 """``heads(set)`` |
913 Members of set with no children in set. |
911 Members of set with no children in set. |
914 """ |
912 """ |
915 s = getset(repo, subset, x).set() |
913 s = getset(repo, subset, x) |
916 ps = parents(repo, subset, x).set() |
914 ps = parents(repo, subset, x) |
917 return baseset([r for r in s if r not in ps]) |
915 return s - ps |
918 |
916 |
919 def hidden(repo, subset, x): |
917 def hidden(repo, subset, x): |
920 """``hidden()`` |
918 """``hidden()`` |
921 Hidden changesets. |
919 Hidden changesets. |
922 """ |
920 """ |
1398 Changesets in set with no parent changeset in set. |
1396 Changesets in set with no parent changeset in set. |
1399 """ |
1397 """ |
1400 s = getset(repo, baseset(repo.changelog), x).set() |
1398 s = getset(repo, baseset(repo.changelog), x).set() |
1401 subset = baseset([r for r in subset if r in s]) |
1399 subset = baseset([r for r in subset if r in s]) |
1402 cs = _children(repo, subset, s) |
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 def secret(repo, subset, x): |
1403 def secret(repo, subset, x): |
1406 """``secret()`` |
1404 """``secret()`` |
1407 Changeset in secret phase.""" |
1405 Changeset in secret phase.""" |
1408 # i18n: "secret" is a keyword |
1406 # i18n: "secret" is a keyword |