tests/filtercr.py
author Patrick Mezard <patrick@mezard.eu>
Wed, 11 Apr 2012 11:22:40 +0200
changeset 16408 d74099ac2ac1
parent 13141 6cfe17c19ba2
permissions -rwxr-xr-x
graphlog: fix --follow --rev combinations The previous behaviour of --follow was really a subset of what is really happening in log command: - If --rev is not passed, default to '.:0' - Resolve --rev into a revision list "revs" - Set the starting revision to revs[0] - If revs[1] > revs[0] keep descendants(revs[0]) in revs, otherwise keep ancestors.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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