Read about our upcoming Code of Conduct on this issue

Commit a47069c8 authored by Raphaël Gomès's avatar Raphaël Gomès
Browse files

python3: add raw prefix to edge-cases kwargs-like objects

parent ea8da5aa23c6
......@@ -121,10 +121,10 @@ def cmddebugconvertobsolete(ui, repo):
if data:
some = True
for oldmark in json.loads(data):
del oldmark['id'] # dropped for now
del oldmark['reason'] # unused until then
oldobject = str(oldmark.pop('object'))
oldsubjects = [str(s) for s in oldmark.pop('subjects', [])]
del oldmark[r'id'] # dropped for now
del oldmark[r'reason'] # unused until then
oldobject = str(oldmark.pop(r'object'))
oldsubjects = [str(s) for s in oldmark.pop(r'subjects', [])]
lookup_errors = (error.RepoLookupError, error.LookupError)
if len(oldobject) != 40:
try:
......@@ -137,7 +137,7 @@ def cmddebugconvertobsolete(ui, repo):
except lookup_errors:
pass
oldmark['date'] = '%i %i' % tuple(oldmark['date'])
oldmark[r'date'] = r'%i %i' % tuple(oldmark[r'date'])
meta = dict((k.encode('utf-8'), v.encode('utf-8'))
for k, v in oldmark.items())
try:
......
......@@ -80,8 +80,8 @@ def wrappush(orig, repo, remote, *args, **kwargs):
opargs = kwargs.get('opargs')
if opargs is None:
opargs = {}
newargs['opargs'] = opargs.copy()
newargs['opargs']['publish'] = True
newargs[r'opargs'] = opargs.copy()
newargs[r'opargs']['publish'] = True
return orig(repo, remote, *args, **newargs)
def extendpushoperation(orig, self, *args, **kwargs):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment