This is an archive of the discontinued Mercurial Phabricator instance.

py3: handle keyword arguments correctly in hgext/largefiles/
ClosedPublic

Authored by pulkit on Dec 9 2017, 8:08 PM.

Details

Summary

Keys of keyword arguments must be str(unicode) on Python 3. The transformer
which we use on Python 3, appends b'' in front of each string literal, so this
may lead in KeyError or None return even when the key is present by we are using
bytes value and it's stored in unicodes. This patch and all the similar patches
handle this by either converting the keys of kwargs to bytes using
'pycompat.byteskwargs()' or adding r'' so that the transformer won't append
b''.

This next 23 patches follows the above mentioned way to handle keyword
arguments.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

pulkit created this revision.Dec 9 2017, 8:08 PM
durin42 accepted this revision.Dec 9 2017, 9:00 PM
This revision is now accepted and ready to land.Dec 9 2017, 9:00 PM
This revision was automatically updated to reflect the committed changes.