Mercurial > hg
view tests/testlib/sigpipe-worker.py @ 49881:b3ae17037b54
dirstate: swap pathto() and get_entry() in idirstate
This way the order of methods in dirstate and idirstate classes is the same.
Just to make it easier to use diff tools to compare the two classes.
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Thu, 05 Jan 2023 19:52:00 +0400 |
parents | 6000f5b25c9b |
children |
line wrap: on
line source
#!/usr/bin/env python3 # # This is literally `cat` but in python, one char at a time. # # see sigpipe-remote.py for details. import io import os import sys if isinstance(sys.stdout.buffer, io.BufferedWriter): print('SIGPIPE-WORKER: script need unbuffered output', file=sys.stderr) sys.exit(255) while True: c = os.read(sys.stdin.fileno(), 1) os.write(sys.stdout.fileno(), c)