# HG changeset patch # User Gregory Szorc # Date 1534447404 0 # Node ID b0c73866c9fb2f1479abdf3b43ba54c0e2606887 # Parent a98e926b2f5b2404f2255f56fa967389550a0b96 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 diff -r a98e926b2f5b -r b0c73866c9fb mercurial/exchange.py --- 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: