tests/filtercr.py
author Martin Geisler <mg@aragost.com>
Wed, 06 Apr 2011 16:21:12 +0200
changeset 13899 a7cd0eee396b
parent 13141 6cfe17c19ba2
permissions -rwxr-xr-x
commit: note when files are missing Before, you could experience the following strange interaction: $ hg commit nothing changed $ hg merge abort: outstanding uncommitted changes which confused at least one user in #mercurial.

#!/usr/bin/env python

# Filter output by the progress extension to make it readable in tests

import sys, re

for line in sys.stdin:
    line = re.sub(r'\r+[^\n]', lambda m: '\n' + m.group()[-1:], line)
    sys.stdout.write(line)
print