##// END OF EJS Templates
bookmarks: use command executor for wire protocol commands...
Gregory Szorc -
r37659:add12981 default
parent child Browse files
Show More
@@ -646,12 +646,16 b' def updatefromremote(ui, repo, remotemar'
646 writer(msg)
646 writer(msg)
647 localmarks.applychanges(repo, tr, changes)
647 localmarks.applychanges(repo, tr, changes)
648
648
649 def incoming(ui, repo, other):
649 def incoming(ui, repo, peer):
650 '''Show bookmarks incoming from other to repo
650 '''Show bookmarks incoming from other to repo
651 '''
651 '''
652 ui.status(_("searching for changed bookmarks\n"))
652 ui.status(_("searching for changed bookmarks\n"))
653
653
654 remotemarks = unhexlifybookmarks(other.listkeys('bookmarks'))
654 with peer.commandexecutor() as e:
655 remotemarks = unhexlifybookmarks(e.callcommand('listkeys', {
656 'namespace': 'bookmarks',
657 }).result())
658
655 r = comparebookmarks(repo, remotemarks, repo._bookmarks)
659 r = comparebookmarks(repo, remotemarks, repo._bookmarks)
656 addsrc, adddst, advsrc, advdst, diverge, differ, invalid, same = r
660 addsrc, adddst, advsrc, advdst, diverge, differ, invalid, same = r
657
661
@@ -733,12 +737,16 b' def outgoing(ui, repo, other):'
733
737
734 return 0
738 return 0
735
739
736 def summary(repo, other):
740 def summary(repo, peer):
737 '''Compare bookmarks between repo and other for "hg summary" output
741 '''Compare bookmarks between repo and other for "hg summary" output
738
742
739 This returns "(# of incoming, # of outgoing)" tuple.
743 This returns "(# of incoming, # of outgoing)" tuple.
740 '''
744 '''
741 remotemarks = unhexlifybookmarks(other.listkeys('bookmarks'))
745 with peer.commandexecutor() as e:
746 remotemarks = unhexlifybookmarks(e.callcommand('listkeys', {
747 'namespace': 'bookmarks',
748 }).result())
749
742 r = comparebookmarks(repo, remotemarks, repo._bookmarks)
750 r = comparebookmarks(repo, remotemarks, repo._bookmarks)
743 addsrc, adddst, advsrc, advdst, diverge, differ, invalid, same = r
751 addsrc, adddst, advsrc, advdst, diverge, differ, invalid, same = r
744 return (len(addsrc), len(adddst))
752 return (len(addsrc), len(adddst))
General Comments 0
You need to be logged in to leave comments. Login now