tests/filtercr.py
author Adrian Buehlmann <adrian@cadifra.com>
Sat, 12 May 2012 14:00:51 +0200
changeset 16695 0a0933d3d59c
parent 13141 6cfe17c19ba2
permissions -rwxr-xr-x
diffhelpers: use Py_ssize_t in testhunk() Eliminates mercurial/diffhelpers.c(143) : warning C4244: '=' : conversion from 'Py_ssize_t' to 'int', possible loss of data mercurial/diffhelpers.c(144) : warning C4244: '=' : conversion from 'Py_ssize_t' to 'int', possible loss of data when compiling for Windows x64 target using the Microsoft compiler.

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