tests/printrepr.py
author Stuart W Marks <smarks@smarks.org>
Thu, 05 Nov 2009 10:53:36 +0100
changeset 9716 ea8c207a0f78
parent 8448 0eb8c4df61bd
child 10263 25e572394f5c
permissions -rwxr-xr-x
update: add comments and test cases for updating across branches Add comment to merge.py:update() showing various cases of 'hg update': to a descendant, crossing named branches, and crossing branches within a named branch; with no option, -c or -C; with or without uncommitted changes; and with or without a specific revision. Add tests for all of these cases.

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