# HG changeset patch # User Martin Geisler # Date 1242520272 -7200 # Node ID 0eb8c4df61bd02620dff3b131069871498bca7d7 # Parent d5ebcf8f6855309164bab114b262f7d6a8243ba0 tests: renamed helper to avoid clash with stdlib repr module diff -r d5ebcf8f6855 -r 0eb8c4df61bd tests/printrepr.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/printrepr.py Sun May 17 02:31:12 2009 +0200 @@ -0,0 +1,11 @@ +#!/usr/bin/env python +# +# Copyright 2009 Matt Mackall 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'), diff -r d5ebcf8f6855 -r 0eb8c4df61bd tests/repr.py --- a/tests/repr.py Sun May 17 01:24:45 2009 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,11 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2009 Matt Mackall 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'), diff -r d5ebcf8f6855 -r 0eb8c4df61bd tests/test-hgweb-commands --- a/tests/test-hgweb-commands Sun May 17 01:24:45 2009 +0200 +++ b/tests/test-hgweb-commands Sun May 17 02:31:12 2009 +0200 @@ -50,7 +50,7 @@ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=branches' echo % changegroup "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=changegroup' \ - | $TESTDIR/repr.py + | $TESTDIR/printrepr.py echo % stream_out "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=stream_out' echo % failing unbundle, requires POST request diff -r d5ebcf8f6855 -r 0eb8c4df61bd tests/test-simplemerge-cmd --- a/tests/test-simplemerge-cmd Sun May 17 01:24:45 2009 +0200 +++ b/tests/test-simplemerge-cmd Sun May 17 02:31:12 2009 +0200 @@ -47,7 +47,7 @@ python simplemerge -p binary-local base other echo '% binary file --text' -python simplemerge -a -p binary-local base other 2>&1 | $TESTDIR/repr.py +python simplemerge -a -p binary-local base other 2>&1 | $TESTDIR/printrepr.py echo '% help' python simplemerge --help