D1631: py3: handle keyword arguments correctly in exchange.py
pulkit (Pulkit Goyal)
phabricator at mercurial-scm.org
Sun Dec 10 02:06:51 UTC 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGa119e97b6caf: py3: handle keyword arguments correctly in exchange.py (authored by pulkit, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D1631?vs=4298&id=4311
REVISION DETAIL
https://phab.mercurial-scm.org/D1631
AFFECTED FILES
mercurial/exchange.py
CHANGE DETAILS
diff --git a/mercurial/exchange.py b/mercurial/exchange.py
--- a/mercurial/exchange.py
+++ b/mercurial/exchange.py
@@ -1333,7 +1333,8 @@
if opargs is None:
opargs = {}
pullop = pulloperation(repo, remote, heads, force, bookmarks=bookmarks,
- streamclonerequested=streamclonerequested, **opargs)
+ streamclonerequested=streamclonerequested,
+ **pycompat.strkwargs(opargs))
peerlocal = pullop.remote.local()
if peerlocal:
@@ -1757,7 +1758,7 @@
b2caps=None, heads=None, common=None, **kwargs):
"""add a changegroup part to the requested bundle"""
cgstream = None
- if kwargs.get('cg', True):
+ if kwargs.get(r'cg', True):
# build changegroup bundle here.
version = '01'
cgversions = b2caps.get('changegroup')
@@ -1785,7 +1786,7 @@
def _getbundlebookmarkpart(bundler, repo, source, bundlecaps=None,
b2caps=None, **kwargs):
"""add a bookmark part to the requested bundle"""
- if not kwargs.get('bookmarks', False):
+ if not kwargs.get(r'bookmarks', False):
return
if 'bookmarks' not in b2caps:
raise ValueError(_('no common bookmarks exchange method'))
@@ -1798,7 +1799,7 @@
def _getbundlelistkeysparts(bundler, repo, source, bundlecaps=None,
b2caps=None, **kwargs):
"""add parts containing listkeys namespaces to the requested bundle"""
- listkeys = kwargs.get('listkeys', ())
+ listkeys = kwargs.get(r'listkeys', ())
for namespace in listkeys:
part = bundler.newpart('listkeys')
part.addparam('namespace', namespace)
@@ -1809,7 +1810,7 @@
def _getbundleobsmarkerpart(bundler, repo, source, bundlecaps=None,
b2caps=None, heads=None, **kwargs):
"""add an obsolescence markers part to the requested bundle"""
- if kwargs.get('obsmarkers', False):
+ if kwargs.get(r'obsmarkers', False):
if heads is None:
heads = repo.heads()
subset = [c.node() for c in repo.set('::%ln', heads)]
@@ -1821,7 +1822,7 @@
def _getbundlephasespart(bundler, repo, source, bundlecaps=None,
b2caps=None, heads=None, **kwargs):
"""add phase heads part to the requested bundle"""
- if kwargs.get('phases', False):
+ if kwargs.get(r'phases', False):
if not 'heads' in b2caps.get('phases'):
raise ValueError(_('no common phases exchange method'))
if heads is None:
@@ -1878,7 +1879,7 @@
# Don't send unless:
# - changeset are being exchanged,
# - the client supports it.
- if not (kwargs.get('cg', True) and 'hgtagsfnodes' in b2caps):
+ if not (kwargs.get(r'cg', True) and 'hgtagsfnodes' in b2caps):
return
outgoing = _computeoutgoing(repo, heads, common)
To: pulkit, #hg-reviewers, durin42
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list