tests/test-convert-git
branchstable
changeset 10987 b3af02b1f19f
parent 9434 f5ce9b052747
child 10990 bb377a311109
--- a/tests/test-convert-git	Sun Apr 25 22:59:50 2010 +0200
+++ b/tests/test-convert-git	Sun Apr 25 23:07:46 2010 +0200
@@ -170,4 +170,17 @@
 echo '% --sourceorder should fail'
 hg convert --sourcesort git-repo4 git-repo4-sourcesort-hg
 
+echo '% damage git repository and convert again'
+cat > damage.py <<EOF
+import os
+for root, dirs, files in os.walk('git-repo4/.git/objects'):
+    if files:
+        path = os.path.join(root, files[0])
+        os.remove(path)
+        break
+EOF
+python damage.py
+hg convert git-repo4 git-repo4-broken-hg 2>&1 | \
+    sed 's/fatal:.*/fatal: git error/g'
+
 true