This is an archive of the discontinued Mercurial Phabricator instance.

transaction: add a name and a __repr__ implementation (API)
ClosedPublic

Authored by martinvonz on Mar 9 2018, 1:38 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

martinvonz created this revision.Mar 9 2018, 1:38 PM
durin42 added a subscriber: durin42.Mar 9 2018, 5:20 PM

Either way, you should make sure this always returns a sysstr, otherwise you'll cause pretty terrible python3 breakage. Look around for other repr instances for examples.

mercurial/transaction.py
191

nit: I think this would make more sense as a repr than a str.

martinvonz marked an inline comment as done.Mar 9 2018, 5:28 PM
martinvonz updated this revision to Diff 6790.
martinvonz updated this revision to Diff 6791.Mar 9 2018, 5:29 PM
durin42 accepted this revision.Mar 9 2018, 5:30 PM
This revision is now accepted and ready to land.Mar 9 2018, 5:30 PM
martinvonz retitled this revision from transaction: add a name and a __str__ implementation (API) to transaction: add a name and a __repr__ implementation (API).Mar 9 2018, 5:30 PM
This revision was automatically updated to reflect the committed changes.