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