Show More
@@ -81,7 +81,9 b' def addbranchrevs(lrepo, other, branches' | |||||
81 | raise error.Abort(_("remote branch lookup not supported")) |
|
81 | raise error.Abort(_("remote branch lookup not supported")) | |
82 | revs.append(hashbranch) |
|
82 | revs.append(hashbranch) | |
83 | return revs, revs[0] |
|
83 | return revs, revs[0] | |
84 | branchmap = peer.branchmap() |
|
84 | ||
|
85 | with peer.commandexecutor() as e: | |||
|
86 | branchmap = e.callcommand('branchmap', {}).result() | |||
85 |
|
87 | |||
86 | def primary(branch): |
|
88 | def primary(branch): | |
87 | if branch == '.': |
|
89 | if branch == '.': | |
@@ -421,7 +423,15 b' def clonewithshare(ui, peeropts, sharepa' | |||||
421 | raise error.Abort(_("src repository does not support " |
|
423 | raise error.Abort(_("src repository does not support " | |
422 | "revision lookup and so doesn't " |
|
424 | "revision lookup and so doesn't " | |
423 | "support clone by revision")) |
|
425 | "support clone by revision")) | |
424 | revs = [srcpeer.lookup(r) for r in rev] |
|
426 | ||
|
427 | # TODO this is batchable. | |||
|
428 | remoterevs = [] | |||
|
429 | for r in rev: | |||
|
430 | with srcpeer.commandexecutor() as e: | |||
|
431 | remoterevs.append(e.callcommand('lookup', { | |||
|
432 | 'key': r, | |||
|
433 | }).result()) | |||
|
434 | revs = remoterevs | |||
425 |
|
435 | |||
426 | # Obtain a lock before checking for or cloning the pooled repo otherwise |
|
436 | # Obtain a lock before checking for or cloning the pooled repo otherwise | |
427 | # 2 clients may race creating or populating it. |
|
437 | # 2 clients may race creating or populating it. | |
@@ -567,7 +577,11 b' def clone(ui, peeropts, source, dest=Non' | |||||
567 | # raises RepoLookupError if revision 0 is filtered or otherwise |
|
577 | # raises RepoLookupError if revision 0 is filtered or otherwise | |
568 | # not available. If we fail to resolve, sharing is not enabled. |
|
578 | # not available. If we fail to resolve, sharing is not enabled. | |
569 | try: |
|
579 | try: | |
570 |
|
|
580 | with srcpeer.commandexecutor() as e: | |
|
581 | rootnode = e.callcommand('lookup', { | |||
|
582 | 'key': '0', | |||
|
583 | }).result() | |||
|
584 | ||||
571 | if rootnode != node.nullid: |
|
585 | if rootnode != node.nullid: | |
572 | sharepath = os.path.join(sharepool, node.hex(rootnode)) |
|
586 | sharepath = os.path.join(sharepool, node.hex(rootnode)) | |
573 | else: |
|
587 | else: | |
@@ -663,7 +677,16 b' def clone(ui, peeropts, source, dest=Non' | |||||
663 | raise error.Abort(_("src repository does not support " |
|
677 | raise error.Abort(_("src repository does not support " | |
664 | "revision lookup and so doesn't " |
|
678 | "revision lookup and so doesn't " | |
665 | "support clone by revision")) |
|
679 | "support clone by revision")) | |
666 | revs = [srcpeer.lookup(r) for r in revs] |
|
680 | ||
|
681 | # TODO this is batchable. | |||
|
682 | remoterevs = [] | |||
|
683 | for rev in revs: | |||
|
684 | with srcpeer.commandexecutor() as e: | |||
|
685 | remoterevs.append(e.callcommand('lookup', { | |||
|
686 | 'key': rev, | |||
|
687 | }).result()) | |||
|
688 | revs = remoterevs | |||
|
689 | ||||
667 | checkout = revs[0] |
|
690 | checkout = revs[0] | |
668 | else: |
|
691 | else: | |
669 | revs = None |
|
692 | revs = None | |
@@ -705,7 +728,11 b' def clone(ui, peeropts, source, dest=Non' | |||||
705 |
|
728 | |||
706 | if update: |
|
729 | if update: | |
707 | if update is not True: |
|
730 | if update is not True: | |
708 |
|
|
731 | with srcpeer.commandexecutor() as e: | |
|
732 | checkout = e.callcommand('lookup', { | |||
|
733 | 'key': update, | |||
|
734 | }).result() | |||
|
735 | ||||
709 | uprev = None |
|
736 | uprev = None | |
710 | status = None |
|
737 | status = None | |
711 | if checkout is not None: |
|
738 | if checkout is not None: |
General Comments 0
You need to be logged in to leave comments.
Login now