tests/filtercr.py
author Patrick Mezard <patrick@mezard.eu>
Sat, 12 May 2012 00:24:07 +0200
changeset 16657 b6081c2c4647
parent 13141 6cfe17c19ba2
permissions -rwxr-xr-x
phases: introduce phasecache The original motivation was changectx.phase() had special logic to correctly lookup in repo._phaserev, including invalidating it when necessary. And at other places, repo._phaserev was accessed directly. This led to the discovery that phases state including _phaseroots, _phaserev and _dirtyphase was manipulated in localrepository.py, phases.py, repair.py, etc. phasecache helps encapsulating that. This patch replaces all phase state in localrepo with phasecache and adjust related code except for advance/retractboundary() in phases. These still access to phasecache internals directly. This will be addressed in a followup.
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