Mercurial > hg-stable
changeset 26184:327d09f0b5d4
exchange: allow fallbackheads to use lazy set behavior
The common ancestor set implementation was made lazy a couple years ago, but
this piece of code still required processing the entire repo by putting set()
around the lazy set. The code was introduced in 5653f2d166ea, a year before the
lazy ancestor set was added.
Dropping the set() shaves 3.5 seconds off of 'push -r' in repos with hundreds of
thousands of commits.
author | Durham Goode <durham@fb.com> |
---|---|
date | Mon, 07 Sep 2015 17:08:35 -0700 |
parents | bf1b24785f13 |
children | e8f9dffca36f |
files | mercurial/exchange.py |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/exchange.py Sat Aug 22 16:38:51 2015 -0700 +++ b/mercurial/exchange.py Mon Sep 07 17:08:35 2015 -0700 @@ -147,7 +147,7 @@ # # We can pick: # * missingheads part of common (::commonheads) - common = set(self.outgoing.common) + common = self.outgoing.common nm = self.repo.changelog.nodemap cheads = [node for node in self.revs if nm[node] in common] # and