Mercurial > public > mercurial-scm > hg-stable
diff mercurial/localrepo.py @ 44107:5a012404503b
localrepo: also fast past the parents of working copies parents
There are descent odds that they will be needed too. So we also cache and
fastpath them.
Differential Revision: https://phab.mercurial-scm.org/D7498
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 21 Nov 2019 23:25:08 +0100 |
parents | bfaf4c673bec |
children | d56a2d6f34f0 |
line wrap: on
line diff
--- a/mercurial/localrepo.py Sun Nov 17 14:54:41 2019 +0100 +++ b/mercurial/localrepo.py Thu Nov 21 23:25:08 2019 +0100 @@ -1543,6 +1543,14 @@ pair = (rev, node) quick[rev] = pair quick[node] = pair + # also add the parents of the parents + for r in cl.parentrevs(rev): + if r == nullrev: + continue + n = cl.node(r) + pair = (r, n) + quick[r] = pair + quick[n] = pair p1node = self.dirstate.p1() if p1node != nullid: quick[b'.'] = quick[p1node]