diff tests/test-convert-svn-move @ 11135:73a4ed3bfef8

convert: add progress support
author Patrick Mezard <pmezard@gmail.com>
date Sun, 09 May 2010 22:50:07 +0200
parents a9b427b5821e
children
line wrap: on
line diff
--- a/tests/test-convert-svn-move	Sun May 09 21:52:34 2010 +0200
+++ b/tests/test-convert-svn-move	Sun May 09 22:50:07 2010 +0200
@@ -51,3 +51,20 @@
 echo '% try updating'
 hg up -qC default
 cd ..
+
+echo '% test convert progress bar'
+
+echo "progress=" >> $HGRCPATH
+echo "[progress]" >> $HGRCPATH
+echo "assume-tty=1" >> $HGRCPATH
+echo "delay=0" >> $HGRCPATH
+echo "refresh=0" >> $HGRCPATH
+
+cat > filtercr.py <<EOF
+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)
+EOF
+
+hg convert svn-repo hg-progress 2>&1 | python filtercr.py