Mercurial > hg
comparison mercurial/debugcommands.py @ 39161:858a12846f4f
setdiscovery: don't use dagutil for node -> rev conversion
The node -> rev conversion is possible using standard storage APIs
and doesn't need to involve the dagutil module.
Differential Revision: https://phab.mercurial-scm.org/D4306
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Thu, 16 Aug 2018 19:47:30 +0000 |
parents | 5b32b3c618b2 |
children | 26f3d075f36e |
comparison
equal
deleted
inserted
replaced
39160:0e46b92b37b1 | 39161:858a12846f4f |
---|---|
792 ui.write(("unpruned common: %s\n") % | 792 ui.write(("unpruned common: %s\n") % |
793 " ".join(sorted(short(n) for n in common))) | 793 " ".join(sorted(short(n) for n in common))) |
794 cl = repo.changelog | 794 cl = repo.changelog |
795 clnode = cl.node | 795 clnode = cl.node |
796 dag = dagutil.revlogdag(cl) | 796 dag = dagutil.revlogdag(cl) |
797 all = dag.ancestorset(dag.internalizeall(common)) | 797 all = dag.ancestorset(cl.rev(n) for n in common) |
798 common = {clnode(r) for r in dag.headsetofconnecteds(all)} | 798 common = {clnode(r) for r in dag.headsetofconnecteds(all)} |
799 else: | 799 else: |
800 nodes = None | 800 nodes = None |
801 if pushedrevs: | 801 if pushedrevs: |
802 revs = scmutil.revrange(repo, pushedrevs) | 802 revs = scmutil.revrange(repo, pushedrevs) |