tests/filtercr.py
author Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
Mon, 06 Jun 2011 21:18:35 +0200
changeset 14552 3417954c42e9
parent 13141 6cfe17c19ba2
permissions -rwxr-xr-x
hg: use capable instead of capabilities

#!/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