##// END OF EJS Templates
merge with stable
Matt Mackall -
r16415:a232a1b5 merge default
parent child Browse files
Show More
@@ -364,13 +364,12 b' def checkstatus(repo, subset, pat, field'
364 break
364 break
365 return s
365 return s
366
366
367 def _children(repo, narrow, s):
367 def _children(repo, narrow, parentset):
368 cs = set()
368 cs = set()
369 pr = repo.changelog.parentrevs
369 pr = repo.changelog.parentrevs
370 s = set(s)
370 for r in narrow:
371 for r in xrange(len(repo)):
372 for p in pr(r):
371 for p in pr(r):
373 if p in s:
372 if p in parentset:
374 cs.add(r)
373 cs.add(r)
375 return cs
374 return cs
376
375
@@ -378,7 +377,7 b' def children(repo, subset, x):'
378 """``children(set)``
377 """``children(set)``
379 Child changesets of changesets in set.
378 Child changesets of changesets in set.
380 """
379 """
381 s = getset(repo, range(len(repo)), x)
380 s = set(getset(repo, range(len(repo)), x))
382 cs = _children(repo, subset, s)
381 cs = _children(repo, subset, s)
383 return [r for r in subset if r in cs]
382 return [r for r in subset if r in cs]
384
383
@@ -994,11 +993,12 b' def reverse(repo, subset, x):'
994
993
995 def roots(repo, subset, x):
994 def roots(repo, subset, x):
996 """``roots(set)``
995 """``roots(set)``
997 Changesets with no parent changeset in set.
996 Changesets in set with no parent changeset in set.
998 """
997 """
999 s = getset(repo, xrange(len(repo)), x)
998 s = set(getset(repo, xrange(len(repo)), x))
1000 cs = _children(repo, s, s)
999 subset = [r for r in subset if r in s]
1001 return [r for r in s if r not in cs]
1000 cs = _children(repo, subset, s)
1001 return [r for r in subset if r not in cs]
1002
1002
1003 def secret(repo, subset, x):
1003 def secret(repo, subset, x):
1004 """``secret()``
1004 """``secret()``
@@ -411,6 +411,8 b' issue2437'
411 2
411 2
412 $ log 'roots(all()) or roots(all())'
412 $ log 'roots(all()) or roots(all())'
413 0
413 0
414 $ hg debugrevspec 'roots(all()) or roots(all())'
415 0
414 $ log 'heads(branch(é)) or heads(branch(é))'
416 $ log 'heads(branch(é)) or heads(branch(é))'
415 9
417 9
416 $ log 'ancestors(8) and (heads(branch("-a-b-c-")) or heads(branch(é)))'
418 $ log 'ancestors(8) and (heads(branch("-a-b-c-")) or heads(branch(é)))'
General Comments 0
You need to be logged in to leave comments. Login now