##// END OF EJS Templates
revset: avoid set duplication in roots()
Patrick Mezard -
r16396:03e408a1 stable
parent child Browse files
Show More
@@ -323,13 +323,12 b' def checkstatus(repo, subset, pat, field'
323 break
323 break
324 return s
324 return s
325
325
326 def _children(repo, narrow, s):
326 def _children(repo, narrow, parentset):
327 cs = set()
327 cs = set()
328 pr = repo.changelog.parentrevs
328 pr = repo.changelog.parentrevs
329 s = set(s)
330 for r in narrow:
329 for r in narrow:
331 for p in pr(r):
330 for p in pr(r):
332 if p in s:
331 if p in parentset:
333 cs.add(r)
332 cs.add(r)
334 return cs
333 return cs
335
334
@@ -337,7 +336,7 b' def children(repo, subset, x):'
337 """``children(set)``
336 """``children(set)``
338 Child changesets of changesets in set.
337 Child changesets of changesets in set.
339 """
338 """
340 s = getset(repo, range(len(repo)), x)
339 s = set(getset(repo, range(len(repo)), x))
341 cs = _children(repo, subset, s)
340 cs = _children(repo, subset, s)
342 return [r for r in subset if r in cs]
341 return [r for r in subset if r in cs]
343
342
General Comments 0
You need to be logged in to leave comments. Login now