##// END OF EJS Templates
revset: do not ignore input revisions in roots()...
Patrick Mezard -
r16394:f3df7d34 stable
parent child Browse files
Show More
@@ -327,7 +327,7 b' def _children(repo, narrow, s):'
327 cs = set()
327 cs = set()
328 pr = repo.changelog.parentrevs
328 pr = repo.changelog.parentrevs
329 s = set(s)
329 s = set(s)
330 for r in xrange(len(repo)):
330 for r in narrow:
331 for p in pr(r):
331 for p in pr(r):
332 if p in s:
332 if p in s:
333 cs.add(r)
333 cs.add(r)
@@ -811,11 +811,11 b' def reverse(repo, subset, x):'
811
811
812 def roots(repo, subset, x):
812 def roots(repo, subset, x):
813 """``roots(set)``
813 """``roots(set)``
814 Changesets with no parent changeset in set.
814 Changesets in set with no parent changeset in set.
815 """
815 """
816 s = getset(repo, xrange(len(repo)), x)
816 s = set(getset(repo, xrange(len(repo)), x))
817 cs = _children(repo, s, s)
817 cs = _children(repo, subset, s)
818 return [r for r in s if r not in cs]
818 return [r for r in subset if r in s and r not in cs]
819
819
820 def secret(repo, subset, x):
820 def secret(repo, subset, x):
821 """``secret()``
821 """``secret()``
@@ -372,6 +372,8 b' issue2437'
372 2
372 2
373 $ log 'roots(all()) or roots(all())'
373 $ log 'roots(all()) or roots(all())'
374 0
374 0
375 $ hg debugrevspec 'roots(all()) or roots(all())'
376 0
375 $ log 'heads(branch(é)) or heads(branch(é))'
377 $ log 'heads(branch(é)) or heads(branch(é))'
376 9
378 9
377 $ log 'ancestors(8) and (heads(branch("-a-b-c-")) or heads(branch(é)))'
379 $ 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