"TypeError: must be encoded string w/o NULL..." Error when committing UNICODE .hgsub
I added a sub-repo to one of my projects and used "echo subrepo = https://bigbucket.org/path/to/subrepo > .hgsub" to create .hgsub. I kept getting the below error until I opened .hgsub in a text editor and changed the encoding to unicode.
I used ConEmu as the console, and the above commands were executed in a powershell.exe shell. I'm not sure which one of those decided to make the file unicode encoded.
** Mercurial version (2.3.2). TortoiseHg version (2.5.1) ** Command: --nofork commit ** CWD: C:\projects\OrchardEnlistments\gradedge-orchard-integration ** Encoding: cp1252 ** Extensions loaded: mq, mercurial_keyring, graphlog ** Python version: 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)] ** Windows version: sys.getwindowsversion(major=6, minor=1, build=7601, platform=2, service_pack='Service Pack 1') ** Processor architecture: x64 ** Qt-4.8.0 PyQt-4.9.1 Traceback (most recent call last): File "tortoisehg\hgqt\status.pyo", line 478, in run File "mercurial\context.pyo", line 332, in sub File "mercurial\subrepo.pyo", line 270, in subrepo File "mercurial\scmutil.pyo", line 144, in __call__ TypeError: must be encoded string without NULL bytes, not str