##// END OF EJS Templates
revset: specify fullreposet without using spanset factory...
Yuya Nishihara -
r24115:ff24af40 default
parent child Browse files
Show More
@@ -349,7 +349,7 b' def rangeset(repo, subset, x, y):'
349 349 return r & subset
350 350
351 351 def dagrange(repo, subset, x, y):
352 r = spanset(repo)
352 r = fullreposet(repo)
353 353 xs = _revsbetween(repo, getset(repo, r, x), getset(repo, r, y))
354 354 return xs & subset
355 355
@@ -396,7 +396,7 b' def ancestor(repo, subset, x):'
396 396 """
397 397 # i18n: "ancestor" is a keyword
398 398 l = getlist(x)
399 rl = spanset(repo)
399 rl = fullreposet(repo)
400 400 anc = None
401 401
402 402 # (getset(repo, rl, i) for i in l) generates a list of lists
@@ -412,7 +412,7 b' def ancestor(repo, subset, x):'
412 412 return baseset()
413 413
414 414 def _ancestors(repo, subset, x, followfirst=False):
415 heads = getset(repo, spanset(repo), x)
415 heads = getset(repo, fullreposet(repo), x)
416 416 if not heads:
417 417 return baseset()
418 418 s = _revancestors(repo, heads, followfirst)
@@ -544,7 +544,7 b' def branch(repo, subset, x):'
544 544 else:
545 545 return subset.filter(lambda r: matcher(getbi(ucl, r)[0]))
546 546
547 s = getset(repo, spanset(repo), x)
547 s = getset(repo, fullreposet(repo), x)
548 548 b = set()
549 549 for r in s:
550 550 b.add(getbi(ucl, r)[0])
@@ -708,7 +708,7 b' def desc(repo, subset, x):'
708 708 return subset.filter(matches)
709 709
710 710 def _descendants(repo, subset, x, followfirst=False):
711 roots = getset(repo, spanset(repo), x)
711 roots = getset(repo, fullreposet(repo), x)
712 712 if not roots:
713 713 return baseset()
714 714 s = _revdescendants(repo, roots, followfirst)
@@ -744,9 +744,9 b' def destination(repo, subset, x):'
744 744 is the same as passing all().
745 745 """
746 746 if x is not None:
747 sources = getset(repo, spanset(repo), x)
747 sources = getset(repo, fullreposet(repo), x)
748 748 else:
749 sources = getall(repo, spanset(repo), x)
749 sources = getall(repo, fullreposet(repo), x)
750 750
751 751 dests = set()
752 752
@@ -1145,7 +1145,7 b' def limit(repo, subset, x):'
1145 1145 # i18n: "limit" is a keyword
1146 1146 raise error.ParseError(_("limit expects a number"))
1147 1147 ss = subset
1148 os = getset(repo, spanset(repo), l[0])
1148 os = getset(repo, fullreposet(repo), l[0])
1149 1149 result = []
1150 1150 it = iter(os)
1151 1151 for x in xrange(lim):
@@ -1172,7 +1172,7 b' def last(repo, subset, x):'
1172 1172 # i18n: "last" is a keyword
1173 1173 raise error.ParseError(_("last expects a number"))
1174 1174 ss = subset
1175 os = getset(repo, spanset(repo), l[0])
1175 os = getset(repo, fullreposet(repo), l[0])
1176 1176 os.reverse()
1177 1177 result = []
1178 1178 it = iter(os)
@@ -1189,7 +1189,7 b' def maxrev(repo, subset, x):'
1189 1189 """``max(set)``
1190 1190 Changeset with highest revision number in set.
1191 1191 """
1192 os = getset(repo, spanset(repo), x)
1192 os = getset(repo, fullreposet(repo), x)
1193 1193 if os:
1194 1194 m = os.max()
1195 1195 if m in subset:
@@ -1226,7 +1226,7 b' def minrev(repo, subset, x):'
1226 1226 """``min(set)``
1227 1227 Changeset with lowest revision number in set.
1228 1228 """
1229 os = getset(repo, spanset(repo), x)
1229 os = getset(repo, fullreposet(repo), x)
1230 1230 if os:
1231 1231 m = os.min()
1232 1232 if m in subset:
@@ -1321,7 +1321,7 b' def only(repo, subset, x):'
1321 1321 cl = repo.changelog
1322 1322 # i18n: "only" is a keyword
1323 1323 args = getargs(x, 1, 2, _('only takes one or two arguments'))
1324 include = getset(repo, spanset(repo), args[0])
1324 include = getset(repo, fullreposet(repo), args[0])
1325 1325 if len(args) == 1:
1326 1326 if not include:
1327 1327 return baseset()
@@ -1330,7 +1330,7 b' def only(repo, subset, x):'
1330 1330 exclude = [rev for rev in cl.headrevs()
1331 1331 if not rev in descendants and not rev in include]
1332 1332 else:
1333 exclude = getset(repo, spanset(repo), args[1])
1333 exclude = getset(repo, fullreposet(repo), args[1])
1334 1334
1335 1335 results = set(cl.findmissingrevs(common=exclude, heads=include))
1336 1336 return subset & results
@@ -1344,9 +1344,9 b' def origin(repo, subset, x):'
1344 1344 for the first operation is selected.
1345 1345 """
1346 1346 if x is not None:
1347 dests = getset(repo, spanset(repo), x)
1347 dests = getset(repo, fullreposet(repo), x)
1348 1348 else:
1349 dests = getall(repo, spanset(repo), x)
1349 dests = getall(repo, fullreposet(repo), x)
1350 1350
1351 1351 def _firstsrc(rev):
1352 1352 src = _getrevsource(repo, rev)
@@ -1399,7 +1399,7 b' def p1(repo, subset, x):'
1399 1399
1400 1400 ps = set()
1401 1401 cl = repo.changelog
1402 for r in getset(repo, spanset(repo), x):
1402 for r in getset(repo, fullreposet(repo), x):
1403 1403 ps.add(cl.parentrevs(r)[0])
1404 1404 ps -= set([node.nullrev])
1405 1405 return subset & ps
@@ -1420,7 +1420,7 b' def p2(repo, subset, x):'
1420 1420
1421 1421 ps = set()
1422 1422 cl = repo.changelog
1423 for r in getset(repo, spanset(repo), x):
1423 for r in getset(repo, fullreposet(repo), x):
1424 1424 ps.add(cl.parentrevs(r)[1])
1425 1425 ps -= set([node.nullrev])
1426 1426 return subset & ps
@@ -1434,7 +1434,7 b' def parents(repo, subset, x):'
1434 1434 else:
1435 1435 ps = set()
1436 1436 cl = repo.changelog
1437 for r in getset(repo, spanset(repo), x):
1437 for r in getset(repo, fullreposet(repo), x):
1438 1438 ps.update(cl.parentrevs(r))
1439 1439 ps -= set([node.nullrev])
1440 1440 return subset & ps
@@ -1675,7 +1675,7 b' def roots(repo, subset, x):'
1675 1675 """``roots(set)``
1676 1676 Changesets in set with no parent changeset in set.
1677 1677 """
1678 s = getset(repo, spanset(repo), x)
1678 s = getset(repo, fullreposet(repo), x)
1679 1679 subset = baseset([r for r in s if r in subset])
1680 1680 cs = _children(repo, subset, s)
1681 1681 return subset - cs
@@ -2450,7 +2450,7 b' def match(ui, spec, repo=None):'
2450 2450 weight, tree = optimize(tree, True)
2451 2451 def mfunc(repo, subset=None):
2452 2452 if subset is None:
2453 subset = spanset(repo)
2453 subset = fullreposet(repo)
2454 2454 if util.safehasattr(subset, 'isascending'):
2455 2455 result = getset(repo, subset, tree)
2456 2456 else:
General Comments 0
You need to be logged in to leave comments. Login now