Mercurial > hg
changeset 39158:b0c73866c9fb
exchange: don't use dagutil
We were only using it for simple node -> rev and parent revision
lookups. These are exposed via the storage interface and we don't
need to go through dagutil.
Differential Revision: https://phab.mercurial-scm.org/D4303
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Thu, 16 Aug 2018 19:23:24 +0000 |
parents | a98e926b2f5b |
children | 5b32b3c618b2 |
files | mercurial/exchange.py |
diffstat | 1 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/exchange.py Fri Jul 20 13:20:01 2018 +0200 +++ b/mercurial/exchange.py Thu Aug 16 19:23:24 2018 +0000 @@ -24,7 +24,6 @@ bookmarks as bookmod, bundle2, changegroup, - dagutil, discovery, error, lock as lockmod, @@ -1906,10 +1905,11 @@ cl = repo.changelog mfl = repo.manifestlog - cldag = dagutil.revlogdag(cl) - # dagutil does not like nullid/nullrev - commonrevs = cldag.internalizeall(common - set([nullid])) | set([nullrev]) - headsrevs = cldag.internalizeall(heads) + clrev = cl.rev + + commonrevs = {clrev(n) for n in common} | {nullrev} + headsrevs = {clrev(n) for n in heads} + if depth: revdepth = {h: 0 for h in headsrevs} @@ -1954,7 +1954,7 @@ required = set(headsrevs) | known for rev in visit: clrev = cl.changelogrevision(rev) - ps = cldag.parents(rev) + ps = [prev for prev in cl.parentrevs(rev) if prev != nullrev] if depth is not None: curdepth = revdepth[rev] for p in ps: