Patchwork D3288: discovery: use command executor interface

login
register
mail settings
Submitter phabricator
Date April 13, 2018, 7:14 p.m.
Message ID <70ee3e53ec4218fd4ee8b5fa72272bd8@localhost.localdomain>
Download mbox | patch
Permalink /patch/30866/
State Not Applicable
Headers show

Comments

phabricator - April 13, 2018, 7:14 p.m.
indygreg updated this revision to Diff 8127.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3288?vs=8081&id=8127

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

AFFECTED FILES
  mercurial/discovery.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/discovery.py b/mercurial/discovery.py
--- a/mercurial/discovery.py
+++ b/mercurial/discovery.py
@@ -203,7 +203,10 @@ 
     headssum = {}
     # A. Create set of branches involved in the push.
     branches = set(repo[n].branch() for n in outgoing.missing)
-    remotemap = remote.branchmap()
+
+    with remote.commandexecutor() as e:
+        remotemap = e.callcommand('branchmap', {}).result()
+
     newbranches = branches - set(remotemap)
     branches.difference_update(newbranches)
 
@@ -287,7 +290,12 @@ 
     repo = pushop.repo.unfiltered()
     remote = pushop.remote
     localbookmarks = repo._bookmarks
-    remotebookmarks = remote.listkeys('bookmarks')
+
+    with remote.commandexecutor() as e:
+        remotebookmarks = e.callcommand('listkeys', {
+            'namespace': 'bookmarks',
+        }).result()
+
     bookmarkedheads = set()
 
     # internal config: bookmarks.pushing