Mercurial > hg
view tests/filtercr.py @ 17305:e66fa4d587dc stable
pager: drop -S option for less in example for pager configuration
Using less -S will hide possibly important information when reviewing a
changeset, e.g. something wrong/dangerous after the 80th column, because
"less" will not give an indication that following characters are hidden.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Tue, 31 Jul 2012 15:50:44 +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