Mercurial > hg
changeset 37637:1964d2d1f421
discovery: use command executor interface
We're trying to port all wire protocol code to use the new
interface so we can implement wire protocol version 2 clients.
Differential Revision: https://phab.mercurial-scm.org/D3288
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Fri, 13 Apr 2018 11:13:05 -0700 |
parents | 330ada7e8ea5 |
children | 65b86ee69383 |
files | mercurial/discovery.py |
diffstat | 1 files changed, 10 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/discovery.py Wed Apr 11 17:24:43 2018 -0700 +++ b/mercurial/discovery.py Fri Apr 13 11:13:05 2018 -0700 @@ -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