Mercurial > hg-stable
changeset 18092:ff36650e4238
localrepo: use lazy ancestor membership testing
For a repository with over 400,000 commits, rebasing one revision near tip,
this avoids two treks up the DAG, speeding the operation up by around 1.6
seconds.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Mon, 17 Dec 2012 20:43:37 -0800 |
parents | f7f8159caad3 |
children | 9c76da468a19 |
files | mercurial/localrepo.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/localrepo.py Tue Dec 18 12:47:20 2012 -0800 +++ b/mercurial/localrepo.py Mon Dec 17 20:43:37 2012 -0800 @@ -2081,7 +2081,7 @@ bases = [nullid] csets, bases, heads = cl.nodesbetween(bases, heads) # We assume that all ancestors of bases are known - common = set(cl.ancestors([cl.rev(n) for n in bases])) + common = cl.ancestors([cl.rev(n) for n in bases]) return self._changegroupsubset(common, csets, heads, source) def getlocalbundle(self, source, outgoing):