mercurial/commands.py
changeset 1420 b32b3509c7ab
parent 1415 c6e6ca96a033
child 1424 918cb47d725e
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -1512,6 +1512,10 @@ def serve(ui, repo, **opts):
         fin, fout = sys.stdin, sys.stdout
         sys.stdout = sys.stderr
 
+        # Prevent insertion/deletion of CRs
+        util.set_binary(fin)
+        util.set_binary(fout)
+
         def getarg():
             argline = fin.readline()[:-1]
             arg, l = argline.split()