Mercurial > hg
diff hgext/infinitepush/__init__.py @ 40252:090e5f3900b7
py3: fix infinitepush extension tests
Differential Revision: https://phab.mercurial-scm.org/D5078
author | Mark Thomas <mbthomas@fb.com> |
---|---|
date | Sat, 13 Oct 2018 12:58:24 +0000 |
parents | c31ce080eb75 |
children | aaad36b88298 |
line wrap: on
line diff
--- a/hgext/infinitepush/__init__.py Sat Oct 13 14:17:25 2018 +0200 +++ b/hgext/infinitepush/__init__.py Sat Oct 13 12:58:24 2018 +0000 @@ -357,8 +357,7 @@ if not self.capable('pushkey'): yield {}, None f = wireprotov1peer.future() - self.ui.debug('preparing listkeys for "%s" with pattern "%s"\n' % - (namespace, patterns)) + self.ui.debug('preparing listkeys for "%s"\n' % namespace) yield { 'namespace': encoding.fromlocal(namespace), 'patterns': wireprototypes.encodelist(patterns) @@ -696,8 +695,8 @@ return common, True, remoteheads def _push(orig, ui, repo, dest=None, *args, **opts): - - bookmark = opts.get(r'bookmark') + opts = pycompat.byteskwargs(opts) + bookmark = opts.get('bookmark') # we only support pushing one infinitepush bookmark at once if len(bookmark) == 1: bookmark = bookmark[0] @@ -718,7 +717,7 @@ if scratchpush: # this is an infinitepush, we don't want the bookmark to be applied # rather that should be stored in the bundlestore - opts[r'bookmark'] = [] + opts['bookmark'] = [] ui.setconfig(experimental, configscratchpush, True) oldphasemove = extensions.wrapfunction(exchange, '_localphasemove', @@ -732,7 +731,7 @@ # Remote scratch bookmarks will be deleted because remotenames doesn't # know about them. Let's save it before push and restore after remotescratchbookmarks = _readscratchremotebookmarks(ui, repo, destpath) - result = orig(ui, repo, dest, *args, **opts) + result = orig(ui, repo, dest, *args, **pycompat.strkwargs(opts)) if common.isremotebooksenabled(ui): if bookmark and scratchpush: other = hg.peer(repo, opts, destpath) @@ -899,7 +898,7 @@ if part.type in ('pushkey', 'changegroup'): if op.reply is not None: rpart = op.reply.newpart('reply:%s' % part.type) - rpart.addparam('in-reply-to', str(part.id), + rpart.addparam('in-reply-to', b'%d' % part.id, mandatory=False) rpart.addparam('return', '1', mandatory=False)