tests/printrepr.py
author Thomas Arendsen Hein <thomas@intevation.de>
Wed, 03 Mar 2010 22:04:59 +0100
branchstable
changeset 10579 f142fa3c0a8c
parent 10263 25e572394f5c
permissions -rwxr-xr-x
Make annotate --follow an alias for -f/--file to behave like in older versions Since 98a0421b9e52 annotate follows copies/renames by default, but the output of e.g. "annotate --follow --number" should not change without some deprecation time.

#!/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 or any later version.

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

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