This is an archive of the discontinued Mercurial Phabricator instance.

linelog: fix bytes/str issue in exception raise on Python 3
ClosedPublic

Authored by durin42 on Aug 9 2018, 10:17 AM.

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.Aug 9 2018, 10:17 AM
yuja added a subscriber: yuja.Aug 9 2018, 10:38 AM

Queued, thanks.

raise LineLogError(
  • 'Probably hit an infinite loop in linelog. Program:\n' +

+ r'Probably hit an infinite loop in linelog. Program:\n' +

self.debugstr())

I assume LineLogError is a kind of a ProgrammingError. If it's a user-facing
error, we'll have to convert a message to bytes.

This revision was automatically updated to reflect the committed changes.

I assume LineLogError is a kind of a ProgrammingError. If it's a user-facing
error, we'll have to convert a message to bytes.

Yep - it should never happen (barring misuse of the API or woefully corrupt linelog files).