Patchwork D3290: logexchange: use command executor for wire protocol commands

login
register
mail settings
Submitter phabricator
Date April 13, 2018, 10:09 p.m.
Message ID <f4f9568997e8e63d6e7aa0d7a356dace@localhost.localdomain>
Download mbox | patch
Permalink /patch/30919/
State Not Applicable
Headers show

Comments

phabricator - April 13, 2018, 10:09 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG0e50dda7e9c1: logexchange: use command executor for wire protocol commands (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3290?vs=8129&id=8175

REVISION DETAIL
  https://phab.mercurial-scm.org/D3290

AFFECTED FILES
  mercurial/logexchange.py

CHANGE DETAILS




To: indygreg, #hg-reviewers, durin42
Cc: mercurial-devel

Patch

diff --git a/mercurial/logexchange.py b/mercurial/logexchange.py
--- a/mercurial/logexchange.py
+++ b/mercurial/logexchange.py
@@ -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():