view tests/filtercr.py @ 14751:712954a67be3 stable

cmdserver: assign repo.baseui before running commands There are places in the code that use localrepository.baseui (see hg.remoteui), we need the ui descriptors (and possibly other things) to be set correctly on it, so output written to the remoteui descriptors ends up at the right place. Before this change, tests such as 'test-bookmarks-pushpull.t' didn't work.
author Idan Kamara <idankk86@gmail.com>
date Fri, 24 Jun 2011 19:44:17 +0300
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