remotenames: write bytes to the file

Summary: The write method requires bytes, let's encode what we're writing into it.

Reviewed By: quark-zju

Differential Revision: D19674450

fbshipit-source-id: 9eaa3393d3d0e6324be39f94d7f31f2228b14412
This commit is contained in:
Xavier Deguillard 2020-01-31 17:29:30 -08:00 committed by Facebook Github Bot
parent 7182c8c2ca
commit 57d59e5499

View File

@ -207,7 +207,7 @@ def _enableselectivepullforremote(repo, remote):
enabledremotes.add(remote)
with vfs(_selectivepullenabledfile, "w", atomictemp=True) as f:
for renabled in enabledremotes:
f.write("%s\n" % renabled)
f.write(pycompat.encodeutf8("%s\n" % renabled))
def _disableselectivepull(repo):