changeset 37639:0e50dda7e9c1

logexchange: use command executor for wire protocol commands Differential Revision: https://phab.mercurial-scm.org/D3290
author Gregory Szorc <gregory.szorc@gmail.com>
date Fri, 13 Apr 2018 11:14:54 -0700
parents 65b86ee69383
children ce8828217369
files mercurial/logexchange.py
diffstat 1 files changed, 11 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/logexchange.py	Fri Apr 13 11:14:19 2018 -0700
+++ b/mercurial/logexchange.py	Fri Apr 13 11:14:54 2018 -0700
@@ -127,14 +127,23 @@
     remoterepo is the peer instance
     """
     remotepath = activepath(localrepo, remoterepo)
-    bookmarks = remoterepo.listkeys('bookmarks')
+
+    with remoterepo.commandexecutor() as e:
+        bookmarks = e.callcommand('listkeys', {
+            'namespace': 'bookmarks',
+        }).result()
+
     # on a push, we don't want to keep obsolete heads since
     # they won't show up as heads on the next pull, so we
     # remove them here otherwise we would require the user
     # to issue a pull to refresh the storage
     bmap = {}
     repo = localrepo.unfiltered()
-    for branch, nodes in remoterepo.branchmap().iteritems():
+
+    with remoterepo.commandexecutor() as e:
+        branchmap = e.callcommand('branchmap', {}).result()
+
+    for branch, nodes in branchmap.iteritems():
         bmap[branch] = []
         for node in nodes:
             if node in repo and not repo[node].obsolete():