##// END OF EJS Templates
discovery: move common heads computation inside partialdiscovery object...
Boris Feld -
r41148:9815d333 default
parent child Browse files
Show More
@@ -182,6 +182,13 b' class partialdiscovery(object):'
182 182 """return True is we have any clue about the remote state"""
183 183 return self._common.hasbases()
184 184
185 def commonheads(self):
186 """the heads of the known common set"""
187 # heads(common) == heads(common.bases) since common represents
188 # common.bases and all its ancestors
189 # The presence of nullrev will confuse heads(). So filter it out.
190 return set(self._repo.revs('heads(%ld)',
191 self._common.bases - {nullrev}))
185 192
186 193 def findcommonheads(ui, local, remote,
187 194 initialsamplesize=100,
@@ -311,10 +318,7 b' def findcommonheads(ui, local, remote,'
311 318 disco.addcommons(commoninsample)
312 319 disco._common.removeancestorsfrom(undecided)
313 320
314 # heads(common) == heads(common.bases) since common represents common.bases
315 # and all its ancestors
316 # The presence of nullrev will confuse heads(). So filter it out.
317 result = set(local.revs('heads(%ld)', disco._common.bases - {nullrev}))
321 result = disco.commonheads()
318 322 elapsed = util.timer() - start
319 323 progress.complete()
320 324 ui.debug("%d total queries in %.4fs\n" % (roundtrips, elapsed))
General Comments 0
You need to be logged in to leave comments. Login now