ui: convert to/from Unicode on Python 3 in ui.editor()
I considered making this I/O be done in terms of bytes, but that would
cause an observable regression for Windows users, as non-binary-mode
open does EOL conversion there. There are probably new encoding
dragons lurking here, so we may want to switch to using binary mode
and doing EOL conversion ourselves.
manifest: use node.hex instead of .encode('hex')
The latter doesn't work on Python 3.
pure: use int instead of long
Similar to the recent
73aa13bc8dac (revlog: use int instead of long,
2017-03-19).
histedit: inline cleanupnode
Move "cleanupnode" (unsafe strip) into "safecleanupnode" so it's impossible
to call the unsafe function directly.
This helps reduce future programming errors.
histedit: use safecleanupnode in _aborthistedit (
issue5500)
Now nobody in histedit calls the unsafe cleanupnode directly.
histedit: add a method to cleanup nodes safely
The new method will decide between:
- cleanupnode, which calls the unsafe repair.strip
- create obsmarkers
Ideally, nobody calls "cleanupnode" directly except for "safecleanupnode".
localrepo: use node.hex instead of awkward .encode('latin1')
Spotted as an option by Yuya. Thanks!