tests/printrepr.py
author Patrick Mezard <pmezard@gmail.com>
Wed, 06 Jan 2010 21:11:58 +0100
changeset 10238 e22695b4472f
parent 8448 0eb8c4df61bd
child 10263 25e572394f5c
permissions -rwxr-xr-x
cmdutil: replace unix pipe handshake with file lock The pipe handshake cannot be implemented with Windows detached process, which disables handle inheritance. Fix 2/3 for issue421

#!/usr/bin/env python
#
# Copyright 2009 Matt Mackall <mpm@selenic.com> and others
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2, incorporated herein by reference.

"""prints repr(sys.stdin) but preserves newlines in input"""

import sys
print repr(sys.stdin.read())[1:-1].replace('\\n', '\n'),