tests/printrepr.py
author Nicolas Dumazet <nicdumz.commits@gmail.com>
Mon, 31 May 2010 17:13:15 +0900
branchstable
changeset 11237 feb2a58fc592
parent 10263 25e572394f5c
permissions -rwxr-xr-x
record: check that we are not committing a merge before patch selection It might sound like a good idea to use record to filter changes when merging. If someone attemps this, it's better to tell her "no" right ahead, before the patch generation/line selection, so she does not spend time doing it just to receive a red light after that (sometimes rather long) process.

#!/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'),