tests/filtercr.py
author Idan Kamara <idankk86@gmail.com>
Fri, 24 Jun 2011 17:04:37 +0300
branchstable
changeset 14739 a95efd378641
parent 13141 6cfe17c19ba2
permissions -rwxr-xr-x
extdiff: use ui out descriptor when calling util.system

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