annotate tests/filtercr.py @ 14050:9e8a9d45945c stable

subrepo: handle svn tracked/unknown directory collisions This happens more often than expected. Say you have an svn subrepository with python code. Python would have generated unknown .pyc files. Now, you rebase this setup on a revision where a directory containing python code does not exist. Subversion is first asked to remove this directory when updating, but will not because it contains untracked items. Then it will have to bring back the directory after the merge but will fail because it now collides with an untracked directory. Using --force is not very elegant and only works with svn >= 1.5 but the only alternative I can think of is to write our own purge command for subversion.
author Patrick Mezard <pmezard@gmail.com>
date Fri, 04 Mar 2011 14:00:49 +0100
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