Patchwork [01,of,10] scmutil: requires are bytes

login
register
mail settings
Submitter timeless
Date May 12, 2016, 1:23 a.m.
Message ID <c3476399e7a64ea562a2.1463016189@gcc2-power8.osuosl.org>
Download mbox | patch
Permalink /patch/15059/
State Rejected
Headers show

Comments

timeless - May 12, 2016, 1:23 a.m.
# HG changeset patch
# User timeless <timeless@mozdev.org>
# Date 1461076451 0
#      Tue Apr 19 14:34:11 2016 +0000
# Node ID c3476399e7a64ea562a2748d010aff57a884481f
# Parent  3850d2e2a559ccbd77db5dee5e849a524049ff90
# Available At bb://timeless/mercurial-crew
#              hg pull bb://timeless/mercurial-crew -r c3476399e7a6
scmutil: requires are bytes

Patch

diff -r 3850d2e2a559 -r c3476399e7a6 mercurial/scmutil.py
--- a/mercurial/scmutil.py	Tue Apr 19 02:36:48 2016 +0000
+++ b/mercurial/scmutil.py	Tue Apr 19 14:34:11 2016 +0000
@@ -1075,7 +1075,7 @@ 
 def writerequires(opener, requirements):
     with opener('requires', 'w') as fp:
         for r in sorted(requirements):
-            fp.write("%s\n" % r)
+            fp.write(b"%s\n" % r.encode('utf-8'))
 
 class filecachesubentry(object):
     def __init__(self, path, stat):