Show More
@@ -51,7 +51,6 b' from .node import (' | |||||
51 | nullrev, |
|
51 | nullrev, | |
52 | ) |
|
52 | ) | |
53 | from . import ( |
|
53 | from . import ( | |
54 | dagutil, |
|
|||
55 | error, |
|
54 | error, | |
56 | util, |
|
55 | util, | |
57 | ) |
|
56 | ) | |
@@ -158,8 +157,6 b' def findcommonheads(ui, local, remote,' | |||||
158 | else: |
|
157 | else: | |
159 | ownheads = [rev for rev in cl.headrevs() if rev != nullrev] |
|
158 | ownheads = [rev for rev in cl.headrevs() if rev != nullrev] | |
160 |
|
159 | |||
161 | dag = dagutil.revlogdag(cl) |
|
|||
162 |
|
||||
163 | # early exit if we know all the specified remote heads already |
|
160 | # early exit if we know all the specified remote heads already | |
164 | ui.debug("query 1; heads\n") |
|
161 | ui.debug("query 1; heads\n") | |
165 | roundtrips += 1 |
|
162 | roundtrips += 1 | |
@@ -273,10 +270,8 b' def findcommonheads(ui, local, remote,' | |||||
273 |
|
270 | |||
274 | # heads(common) == heads(common.bases) since common represents common.bases |
|
271 | # heads(common) == heads(common.bases) since common represents common.bases | |
275 | # and all its ancestors |
|
272 | # and all its ancestors | |
276 | result = dag.headsetofconnecteds(common.bases) |
|
273 | # The presence of nullrev will confuse heads(). So filter it out. | |
277 | # common.bases can include nullrev, but our contract requires us to not |
|
274 | result = set(local.revs('heads(%ld)', common.bases - {nullrev})) | |
278 | # return any heads in that case, so discard that |
|
|||
279 | result.discard(nullrev) |
|
|||
280 | elapsed = util.timer() - start |
|
275 | elapsed = util.timer() - start | |
281 | progress.complete() |
|
276 | progress.complete() | |
282 | ui.debug("%d total queries in %.4fs\n" % (roundtrips, elapsed)) |
|
277 | ui.debug("%d total queries in %.4fs\n" % (roundtrips, elapsed)) |
General Comments 0
You need to be logged in to leave comments.
Login now