Show More
@@ -1512,6 +1512,10 b' def serve(ui, repo, **opts):' | |||||
1512 | fin, fout = sys.stdin, sys.stdout |
|
1512 | fin, fout = sys.stdin, sys.stdout | |
1513 | sys.stdout = sys.stderr |
|
1513 | sys.stdout = sys.stderr | |
1514 |
|
1514 | |||
|
1515 | # Prevent insertion/deletion of CRs | |||
|
1516 | util.set_binary(fin) | |||
|
1517 | util.set_binary(fout) | |||
|
1518 | ||||
1515 | def getarg(): |
|
1519 | def getarg(): | |
1516 | argline = fin.readline()[:-1] |
|
1520 | argline = fin.readline()[:-1] | |
1517 | arg, l = argline.split() |
|
1521 | arg, l = argline.split() |
@@ -390,6 +390,7 b' else:' | |||||
390 |
|
390 | |||
391 | # Platform specific variants |
|
391 | # Platform specific variants | |
392 | if os.name == 'nt': |
|
392 | if os.name == 'nt': | |
|
393 | demandload(globals(), "msvcrt") | |||
393 | nulldev = 'NUL:' |
|
394 | nulldev = 'NUL:' | |
394 |
|
395 | |||
395 | try: |
|
396 | try: | |
@@ -438,6 +439,9 b" if os.name == 'nt':" | |||||
438 | def set_exec(f, mode): |
|
439 | def set_exec(f, mode): | |
439 | pass |
|
440 | pass | |
440 |
|
441 | |||
|
442 | def set_binary(fd): | |||
|
443 | msvcrt.setmode(fd.fileno(), os.O_BINARY) | |||
|
444 | ||||
441 | def pconvert(path): |
|
445 | def pconvert(path): | |
442 | return path.replace("\\", "/") |
|
446 | return path.replace("\\", "/") | |
443 |
|
447 | |||
@@ -484,6 +488,9 b' else:' | |||||
484 | else: |
|
488 | else: | |
485 | os.chmod(f, s & 0666) |
|
489 | os.chmod(f, s & 0666) | |
486 |
|
490 | |||
|
491 | def set_binary(fd): | |||
|
492 | pass | |||
|
493 | ||||
487 | def pconvert(path): |
|
494 | def pconvert(path): | |
488 | return path |
|
495 | return path | |
489 |
|
496 |
General Comments 0
You need to be logged in to leave comments.
Login now