( )⚙ D1556 py3: use pycompat.bytestr() or '%d' in place of str()

This is an archive of the discontinued Mercurial Phabricator instance.

py3: use pycompat.bytestr() or '%d' in place of str()
ClosedPublic

Authored by pulkit on Nov 29 2017, 6:09 PM.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

pulkit created this revision.Nov 29 2017, 6:09 PM
yuja requested changes to this revision.Nov 30 2017, 7:25 AM
yuja added a subscriber: yuja.
yuja added inline comments.
mercurial/cmdutil.py
826

'%d' is preferred if the value type is known.

(applies to the other integer values.)

828

Perhaps this can be desc or ''.

hg archive '%m' creates a directory "None", but which is probably
a bug.

This revision now requires changes to proceed.Nov 30 2017, 7:25 AM
pulkit retitled this revision from py3: use pycompat.bytestr() in place of str() to py3: use pycompat.bytestr() or '%d' in place of str().Dec 1 2017, 9:13 AM
pulkit updated this revision to Diff 4049.
yuja requested changes to this revision.Dec 1 2017, 9:57 PM
yuja added inline comments.
mercurial/cmdutil.py
828

and now no str() nor bytestr() should be needed.

This revision now requires changes to proceed.Dec 1 2017, 9:57 PM
pulkit updated this revision to Diff 4084.Dec 2 2017, 2:51 PM
yuja accepted this revision.Dec 3 2017, 3:54 AM
This revision is now accepted and ready to land.Dec 3 2017, 3:54 AM
This revision was automatically updated to reflect the committed changes.