Details
- Reviewers
durin42 pulkit - Group Reviewers
hg-reviewers - Commits
- rHG9b8e13a038db: histedit: py3 fixes for curses mode
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
Maybe this should be in the patch comment, but justification for the change:
_chistedit is looking for bytestr opt keys, but is getting string keys. Normally, I'd use pycompat.byteskwargs at the top, except that _texthistedit is called at the bottom and it's expecting to see str keys initially (before it fixes them up). So I canonicalize in the caller (that chooses between an initial _chistedit or _texthistedit), except that it's passing the opts with **opts and Python requires keywords to be str. So I stop splatting the args and opts.
I wasn't involved in the py3 port, but it does seem weird to me that strings are forced to be bytes everywhere. That makes sense for everything read out of a repo, but it seems like the command line should think in strings for both keys and non-path values. But I'm sure there were some hard decisions to make.