Show More
@@ -509,6 +509,8 b' class localrepository:' | |||
|
509 | 509 | unknown = [tip] |
|
510 | 510 | search = [] |
|
511 | 511 | fetch = [] |
|
512 | seen = {} | |
|
513 | seenbranch = {} | |
|
512 | 514 | |
|
513 | 515 | if tip[0] in m: |
|
514 | 516 | self.ui.note("nothing to do!\n") |
@@ -516,10 +518,18 b' class localrepository:' | |||
|
516 | 518 | |
|
517 | 519 | while unknown: |
|
518 | 520 | n = unknown.pop(0) |
|
521 | seen[n[0]] = 1 | |
|
522 | ||
|
523 | self.ui.debug("examining %s:%s\n" % (short(n[0]), short(n[1]))) | |
|
519 | 524 | if n == nullid: break |
|
525 | if n in seenbranch: | |
|
526 | self.ui.debug("branch already found\n") | |
|
527 | continue | |
|
520 | 528 | if n[1] and n[1] in m: # do we know the base? |
|
521 |
self.ui.debug("found incomplete branch %s\n" |
|
|
529 | self.ui.debug("found incomplete branch %s:%s\n" | |
|
530 | % (short(n[0]), short(n[1]))) | |
|
522 | 531 | search.append(n) # schedule branch range for scanning |
|
532 | seenbranch[n] = 1 | |
|
523 | 533 | else: |
|
524 | 534 | if n[2] in m and n[3] in m: |
|
525 | 535 | if n[1] not in fetch: |
@@ -527,8 +537,18 b' class localrepository:' | |||
|
527 | 537 | short(n[1])) |
|
528 | 538 | fetch.append(n[1]) # earliest unknown |
|
529 | 539 | continue |
|
530 | for b in remote.branches([n[2], n[3]]): | |
|
531 |
|
|
|
540 | ||
|
541 | r = [] | |
|
542 | for a in n[2:4]: | |
|
543 | if a not in seen: r.append(a) | |
|
544 | ||
|
545 | if r: | |
|
546 | self.ui.debug("requesting %s\n" % | |
|
547 | " ".join(map(short, r))) | |
|
548 | for b in remote.branches(r): | |
|
549 | self.ui.debug("received %s:%s\n" % | |
|
550 | (short(b[0]), short(b[1]))) | |
|
551 | if b[0] not in m and b[0] not in seen: | |
|
532 | 552 | unknown.append(b) |
|
533 | 553 | |
|
534 | 554 | while search: |
@@ -783,7 +803,7 b' class remoterepository:' | |||
|
783 | 803 | def branches(self, nodes): |
|
784 | 804 | n = " ".join(map(hex, nodes)) |
|
785 | 805 | d = self.do_cmd("branches", nodes=n).read() |
|
786 | br = [ map(bin, b.split(" ")) for b in d.splitlines() ] | |
|
806 | br = [ tuple(map(bin, b.split(" "))) for b in d.splitlines() ] | |
|
787 | 807 | return br |
|
788 | 808 | |
|
789 | 809 | def between(self, pairs): |
General Comments 0
You need to be logged in to leave comments.
Login now