tests/test-import
changeset 11407 f5be44090ba8
parent 10883 196908117c27
equal deleted inserted replaced
11406:42408cd43f55 11407:f5be44090ba8
   294 rename from ../outside/foo
   294 rename from ../outside/foo
   295 rename to bar
   295 rename to bar
   296 EOF
   296 EOF
   297 cd ..
   297 cd ..
   298 
   298 
   299 echo '% test import with similarity (issue295)'
   299 echo '% test import with similarity and git and strip (issue295 et al.)'
   300 hg init sim
   300 hg init sim
   301 cd sim
   301 cd sim
   302 echo 'this is a test' > a
   302 echo 'this is a test' > a
   303 hg ci -Ama
   303 hg ci -Ama
   304 cat > ../rename.diff <<EOF
   304 cat > ../rename.diff <<EOF
   305 diff --git a/a b/a
   305 diff --git a/foo/a b/foo/a
   306 deleted file mode 100644
   306 deleted file mode 100644
   307 --- a/a
   307 --- a/foo/a
   308 +++ /dev/null
   308 +++ /dev/null
   309 @@ -1,1 +0,0 @@
   309 @@ -1,1 +0,0 @@
   310 -this is a test
   310 -this is a test
   311 diff --git a/b b/b
   311 diff --git a/foo/b b/foo/b
   312 new file mode 100644
   312 new file mode 100644
   313 --- /dev/null
   313 --- /dev/null
   314 +++ b/b
   314 +++ b/foo/b
   315 @@ -0,0 +1,2 @@
   315 @@ -0,0 +1,2 @@
   316 +this is a test
   316 +this is a test
   317 +foo
   317 +foo
   318 EOF
   318 EOF
   319 hg import --no-commit -v -s 1 ../rename.diff
   319 hg import --no-commit -v -s 1 ../rename.diff -p2
   320 hg st -C
   320 hg st -C
   321 hg revert -a
   321 hg revert -a
   322 rm b
   322 rm b
   323 hg import --no-commit -v -s 100 ../rename.diff
   323 hg import --no-commit -v -s 100 ../rename.diff -p2
   324 hg st -C
   324 hg st -C
   325 cd ..
   325 cd ..
   326 
   326 
   327 
   327 
   328 echo '% add empty file from the end of patch (issue 1495)'
   328 echo '% add empty file from the end of patch (issue 1495)'