##// END OF EJS Templates
setdiscovery: don't use dagutil for node -> rev conversion...
Gregory Szorc -
r39197:858a1284 default
parent child Browse files
Show More
@@ -794,7 +794,7 b' def debugdiscovery(ui, repo, remoteurl="'
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
@@ -143,11 +143,11 b' def findcommonheads(ui, local, remote,'
143 roundtrips = 0
143 roundtrips = 0
144 cl = local.changelog
144 cl = local.changelog
145 clnode = cl.node
145 clnode = cl.node
146 clrev = cl.rev
146 localsubset = None
147 localsubset = None
147
148
148 if ancestorsof is not None:
149 if ancestorsof is not None:
149 rev = local.changelog.rev
150 localsubset = [clrev(n) for n in ancestorsof]
150 localsubset = [rev(n) for n in ancestorsof]
151 dag = dagutil.revlogdag(cl, localsubset=localsubset)
151 dag = dagutil.revlogdag(cl, localsubset=localsubset)
152
152
153 # early exit if we know all the specified remote heads already
153 # early exit if we know all the specified remote heads already
@@ -175,7 +175,17 b' def findcommonheads(ui, local, remote,'
175 # compatibility reasons)
175 # compatibility reasons)
176 ui.status(_("searching for changes\n"))
176 ui.status(_("searching for changes\n"))
177
177
178 srvheads = dag.internalizeall(srvheadhashes, filterunknown=True)
178 srvheads = []
179 for node in srvheadhashes:
180 if node == nullid:
181 continue
182
183 try:
184 srvheads.append(clrev(node))
185 # Catches unknown and filtered nodes.
186 except error.LookupError:
187 continue
188
179 if len(srvheads) == len(srvheadhashes):
189 if len(srvheads) == len(srvheadhashes):
180 ui.debug("all remote heads known locally\n")
190 ui.debug("all remote heads known locally\n")
181 return srvheadhashes, False, srvheadhashes
191 return srvheadhashes, False, srvheadhashes
General Comments 0
You need to be logged in to leave comments. Login now