Show More
@@ -182,6 +182,13 b' class partialdiscovery(object):' | |||||
182 | """return True is we have any clue about the remote state""" |
|
182 | """return True is we have any clue about the remote state""" | |
183 | return self._common.hasbases() |
|
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 | def findcommonheads(ui, local, remote, |
|
193 | def findcommonheads(ui, local, remote, | |
187 | initialsamplesize=100, |
|
194 | initialsamplesize=100, | |
@@ -311,10 +318,7 b' def findcommonheads(ui, local, remote,' | |||||
311 | disco.addcommons(commoninsample) |
|
318 | disco.addcommons(commoninsample) | |
312 | disco._common.removeancestorsfrom(undecided) |
|
319 | disco._common.removeancestorsfrom(undecided) | |
313 |
|
320 | |||
314 | # heads(common) == heads(common.bases) since common represents common.bases |
|
321 | result = disco.commonheads() | |
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})) |
|
|||
318 | elapsed = util.timer() - start |
|
322 | elapsed = util.timer() - start | |
319 | progress.complete() |
|
323 | progress.complete() | |
320 | ui.debug("%d total queries in %.4fs\n" % (roundtrips, elapsed)) |
|
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