tests/test-import
changeset 7402 bffdab64dfbb
parent 7247 c4461ea8b4c8
child 7971 6ea0318daf75
--- a/tests/test-import	Sun Nov 23 18:08:19 2008 -0800
+++ b/tests/test-import	Sat Nov 22 00:21:57 2008 -0800
@@ -285,3 +285,31 @@
 rename to bar
 EOF
 cd ..
+
+echo '% test import with similarity (issue295)'
+hg init sim
+cd sim
+echo 'this is a test' > a
+hg ci -Ama
+cat > ../rename.diff <<EOF
+diff --git a/a b/a
+deleted file mode 100644
+--- a/a
++++ /dev/null
+@@ -1,1 +0,0 @@
+-this is a test
+diff --git a/b b/b
+new file mode 100644
+--- /dev/null
++++ b/b
+@@ -0,0 +1,2 @@
++this is a test
++foo
+EOF
+hg import --no-commit -v -s 1 ../rename.diff
+hg st -C
+hg revert -a
+rm b
+hg import --no-commit -v -s 100 ../rename.diff
+hg st -C
+cd ..