annotate tests/filtercr.py @ 13955:86b5cc1e8be8 stable

help config: explain that config files do not exist by default Inspired by critique given on StackOverflow where a user writes: I can have a good guess at what "%USERPROFILE%" might signify but none of the files listed in the "hg help config" output exist after running the installer. Previous experience would suggest that missing files mean something somewhere has gone seriously wrong. http://stackoverflow.com/questions/2329023/2351139#2351139
author Martin Geisler <mg@lazybytes.net>
date Mon, 18 Apr 2011 13:57:22 +0200
parents 6cfe17c19ba2
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
13141
6cfe17c19ba2 tests: add filtercr.py helper for progress tests
Martin Geisler <mg@aragost.com>
parents:
diff changeset
1 #!/usr/bin/env python
6cfe17c19ba2 tests: add filtercr.py helper for progress tests
Martin Geisler <mg@aragost.com>
parents:
diff changeset
2
6cfe17c19ba2 tests: add filtercr.py helper for progress tests
Martin Geisler <mg@aragost.com>
parents:
diff changeset
3 # Filter output by the progress extension to make it readable in tests
6cfe17c19ba2 tests: add filtercr.py helper for progress tests
Martin Geisler <mg@aragost.com>
parents:
diff changeset
4
6cfe17c19ba2 tests: add filtercr.py helper for progress tests
Martin Geisler <mg@aragost.com>
parents:
diff changeset
5 import sys, re
6cfe17c19ba2 tests: add filtercr.py helper for progress tests
Martin Geisler <mg@aragost.com>
parents:
diff changeset
6
6cfe17c19ba2 tests: add filtercr.py helper for progress tests
Martin Geisler <mg@aragost.com>
parents:
diff changeset
7 for line in sys.stdin:
6cfe17c19ba2 tests: add filtercr.py helper for progress tests
Martin Geisler <mg@aragost.com>
parents:
diff changeset
8 line = re.sub(r'\r+[^\n]', lambda m: '\n' + m.group()[-1:], line)
6cfe17c19ba2 tests: add filtercr.py helper for progress tests
Martin Geisler <mg@aragost.com>
parents:
diff changeset
9 sys.stdout.write(line)
6cfe17c19ba2 tests: add filtercr.py helper for progress tests
Martin Geisler <mg@aragost.com>
parents:
diff changeset
10 print