mirror of
https://github.com/facebook/sapling.git
synced 2024-12-27 06:52:23 +03:00
revset: avoid full repo scan in children revset
Summary: The children revset iterated over everything in the subset, which in many cases was the entire repo. This can take hundreds of milliseconds. Let's use the new _makerangeset to only iterate over descendants of the parentset. Reviewed By: quark-zju Differential Revision: D23794344 fbshipit-source-id: 9ac9bc014d56a95b5ac65534769389167b0f4508
This commit is contained in:
parent
b78115f4e8
commit
7b4bbc2f64
@ -853,9 +853,11 @@ def _children(repo, subset, parentset):
|
|||||||
def isvisible(rev):
|
def isvisible(rev):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
for r in subset:
|
if minrev is not None:
|
||||||
if r <= minrev:
|
for r in _makerangeset(repo, subset, minrev, smartset.maxrev, anyorder):
|
||||||
|
if r == nullrev:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
p1, p2 = pr(r)
|
p1, p2 = pr(r)
|
||||||
if p1 in parentset and isvisible(r):
|
if p1 in parentset and isvisible(r):
|
||||||
cs.add(r)
|
cs.add(r)
|
||||||
|
Loading…
Reference in New Issue
Block a user