view tests/filtercr.py @ 17646:d44731a3adb8

histedit-test: ensure that non commute test will never commute The previous version would commute if using merge algorithm (to be accurate, merge will cleanly prompt the user during the merge). The new version create and initial commit with some content for all involved files en ensure all changes are a content changes of the first lines. This lead to guaranteed conflict when commuted.
author Pierre-Yves David <pierre-yves.david@logilab.fr>
date Fri, 21 Sep 2012 19:13:25 +0200
parents 6cfe17c19ba2
children
line wrap: on
line source

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