##// END OF EJS Templates
path: pass `path` to `peer` in infinitepush...
marmoute -
r50629:4dfcdb20 default
parent child Browse files
Show More
@@ -683,12 +683,10 b' def _lookupwrap(orig):'
683 683 def _pull(orig, ui, repo, source=b"default", **opts):
684 684 opts = pycompat.byteskwargs(opts)
685 685 # Copy paste from `pull` command
686 source, branches = urlutil.get_unique_pull_path(
686 path = urlutil.get_unique_pull_path_obj(
687 687 b"infinite-push's pull",
688 repo,
689 688 ui,
690 689 source,
691 default_branches=opts.get(b'branch'),
692 690 )
693 691
694 692 scratchbookmarks = {}
@@ -709,7 +707,7 b' def _pull(orig, ui, repo, source=b"defau'
709 707 bookmarks.append(bookmark)
710 708
711 709 if scratchbookmarks:
712 other = hg.peer(repo, opts, source)
710 other = hg.peer(repo, opts, path)
713 711 try:
714 712 fetchedbookmarks = other.listkeyspatterns(
715 713 b'bookmarks', patterns=scratchbookmarks
@@ -734,14 +732,14 b' def _pull(orig, ui, repo, source=b"defau'
734 732 try:
735 733 # Remote scratch bookmarks will be deleted because remotenames doesn't
736 734 # know about them. Let's save it before pull and restore after
737 remotescratchbookmarks = _readscratchremotebookmarks(ui, repo, source)
738 result = orig(ui, repo, source, **pycompat.strkwargs(opts))
735 remotescratchbookmarks = _readscratchremotebookmarks(ui, repo, path.loc)
736 result = orig(ui, repo, path.loc, **pycompat.strkwargs(opts))
739 737 # TODO(stash): race condition is possible
740 738 # if scratch bookmarks was updated right after orig.
741 739 # But that's unlikely and shouldn't be harmful.
742 740 if common.isremotebooksenabled(ui):
743 741 remotescratchbookmarks.update(scratchbookmarks)
744 _saveremotebookmarks(repo, remotescratchbookmarks, source)
742 _saveremotebookmarks(repo, remotescratchbookmarks, path.loc)
745 743 else:
746 744 _savelocalbookmarks(repo, scratchbookmarks)
747 745 return result
General Comments 0
You need to be logged in to leave comments. Login now