This is an archive of the discontinued Mercurial Phabricator instance.

util: use pycompat.bytestr() on repr() in date parse abort
ClosedPublic

Authored by durin42 on Feb 25 2018, 10:49 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

durin42 created this revision.Feb 25 2018, 10:49 PM
durin42 updated this revision to Diff 6086.Feb 26 2018, 12:16 AM
durin42 updated this revision to Diff 6099.Feb 26 2018, 1:01 AM
yuja added a subscriber: yuja.Feb 26 2018, 7:35 AM

I think shellquote() is okay, but simpler workaround is to use bytestr(date)
to drop b.

durin42 edited the summary of this revision. (Show Details)Mar 1 2018, 2:11 PM
durin42 retitled this revision from util: use util.shellquote() instead of repr() in date parse abort to util: use pycompat.bytestr() on repr() in date parse abort.
durin42 updated this revision to Diff 6267.
durin42 updated this revision to Diff 6296.Mar 1 2018, 5:51 PM
pulkit accepted this revision.Mar 1 2018, 6:06 PM
pulkit added a subscriber: pulkit.

Looks good to me and Yuya's feedback is also addressed. Queued thanks.

This revision was automatically updated to reflect the committed changes.
yuja added a comment.Mar 1 2018, 10:55 PM

repr() should be applied to a bytestr object to get bytestr.repr() working.
Fixed in flight.