Mercurial > hg
diff hgext/remotefilelog/remotefilectx.py @ 40610:13d4ad8d7801
py3: fix keyword arguments handling in hgext/remotefilelog/
Keys of kwargs on Python 3 should be strings. This patch fixes them by appending
r'' prefixes, and using pycompat.byteskwargs() and pycompat.strkwargs().
Differential Revision: https://phab.mercurial-scm.org/D5259
author | Pulkit Goyal <pulkit@yandex-team.ru> |
---|---|
date | Tue, 13 Nov 2018 17:41:26 +0300 |
parents | 3a333a582d7b |
children | 92a5fb73b3d5 |
line wrap: on
line diff
--- a/hgext/remotefilelog/remotefilectx.py Sat Oct 13 05:09:18 2018 +0300 +++ b/hgext/remotefilelog/remotefilectx.py Tue Nov 13 17:41:26 2018 +0300 @@ -15,6 +15,7 @@ context, error, phases, + pycompat, util, ) from . import shallowutil @@ -218,11 +219,11 @@ return linknode commonlogkwargs = { - 'revs': ' '.join([hex(cl.node(rev)) for rev in revs]), - 'fnode': hex(fnode), - 'filepath': path, - 'user': shallowutil.getusername(repo.ui), - 'reponame': shallowutil.getreponame(repo.ui), + r'revs': ' '.join([hex(cl.node(rev)) for rev in revs]), + r'fnode': hex(fnode), + r'filepath': path, + r'user': shallowutil.getusername(repo.ui), + r'reponame': shallowutil.getreponame(repo.ui), } repo.ui.log('linkrevfixup', 'adjusting linknode', **commonlogkwargs) @@ -315,7 +316,7 @@ finally: elapsed = time.time() - start repo.ui.log('linkrevfixup', logmsg, elapsed=elapsed * 1000, - **commonlogkwargs) + **pycompat.strkwargs(commonlogkwargs)) def _verifylinknode(self, revs, linknode): """ @@ -408,7 +409,7 @@ def annotate(self, *args, **kwargs): introctx = self - prefetchskip = kwargs.pop('prefetchskip', None) + prefetchskip = kwargs.pop(r'prefetchskip', None) if prefetchskip: # use introrev so prefetchskip can be accurately tested introrev = self.introrev()