Mercurial > public > mercurial-scm > hg
diff hgext/remotefilelog/debugcommands.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 | 6f0b6905ef6f |
children | 3fa4183e7803 |
line wrap: on
line diff
--- a/hgext/remotefilelog/debugcommands.py Sat Oct 13 05:09:18 2018 +0300 +++ b/hgext/remotefilelog/debugcommands.py Tue Nov 13 17:41:26 2018 +0300 @@ -28,7 +28,7 @@ ) def debugremotefilelog(ui, path, **opts): - decompress = opts.get('decompress') + decompress = opts.get(r'decompress') size, firstnode, mapping = parsefileblob(path, decompress) @@ -89,9 +89,9 @@ def debugindex(orig, ui, repo, file_=None, **opts): """dump the contents of an index file""" - if (opts.get('changelog') or - opts.get('manifest') or - opts.get('dir') or + if (opts.get(r'changelog') or + opts.get(r'manifest') or + opts.get(r'dir') or not shallowutil.isenabled(repo) or not repo.shallowmatch(file_)): return orig(ui, repo, file_, **opts) @@ -154,7 +154,7 @@ ui.write("}\n") def verifyremotefilelog(ui, path, **opts): - decompress = opts.get('decompress') + decompress = opts.get(r'decompress') for root, dirs, files in os.walk(path): for file in files: @@ -213,13 +213,13 @@ path = path[:path.index('.data')] ui.write("%s:\n" % path) dpack = datapack.datapack(path) - node = opts.get('node') + node = opts.get(r'node') if node: deltachain = dpack.getdeltachain('', bin(node)) dumpdeltachain(ui, deltachain, **opts) return - if opts.get('long'): + if opts.get(r'long'): hashformatter = hex hashlen = 42 else: