comparison 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
comparison
equal deleted inserted replaced
44106:bfaf4c673bec 44107:5a012404503b
1541 # skip the fast path and let higher code deal with it 1541 # skip the fast path and let higher code deal with it
1542 continue 1542 continue
1543 pair = (rev, node) 1543 pair = (rev, node)
1544 quick[rev] = pair 1544 quick[rev] = pair
1545 quick[node] = pair 1545 quick[node] = pair
1546 # also add the parents of the parents
1547 for r in cl.parentrevs(rev):
1548 if r == nullrev:
1549 continue
1550 n = cl.node(r)
1551 pair = (r, n)
1552 quick[r] = pair
1553 quick[n] = pair
1546 p1node = self.dirstate.p1() 1554 p1node = self.dirstate.p1()
1547 if p1node != nullid: 1555 if p1node != nullid:
1548 quick[b'.'] = quick[p1node] 1556 quick[b'.'] = quick[p1node]
1549 return quick 1557 return quick
1550 1558