( )⚙ D7181 py3: make chistedit render

This is an archive of the discontinued Mercurial Phabricator instance.

py3: make chistedit render
ClosedPublic

Authored by martinvonz on Oct 31 2019, 6:22 PM.

Details

Summary

Now you can see the list of commits, but it crashes when you press a
key.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

martinvonz created this revision.Oct 31 2019, 6:22 PM
indygreg added inline comments.
hgext/histedit.py
1120

__bytes__ doesn't exist in Python 2. Did this patch regress Python 2?

martinvonz added inline comments.Nov 1 2019, 12:11 AM
hgext/histedit.py
1120

Oh, good point! I'll make sure to test it on Python 2 as well. Update coming soon.

martinvonz updated this revision to Diff 17428.Nov 1 2019, 12:16 AM
yuja added a subscriber: yuja.Nov 1 2019, 9:35 AM

+ return b"#%s %s %d:%s %s" % ((b'%d' % self.origpos).ljust(2),
+ action.ljust(6), r, h, desc)
+
+ bytes = str

__str__ = encoding.strmethod(__bytes__) can be used instead. __str__
of Python3 must return unicode string.

Feel free to do that in flight. Otherwise I'll do it later today.

It won't matter in practice. We should of course have a separate method
explicitly for creating a line instead. But that's not for stable.

martinvonz updated this revision to Diff 17436.Nov 1 2019, 12:34 PM
indygreg accepted this revision.Nov 1 2019, 1:29 PM
This revision is now accepted and ready to land.Nov 1 2019, 1:29 PM
This revision was automatically updated to reflect the committed changes.