Mercurial > hg
comparison tests/test-import @ 10745:d94832c4a31d stable
patch: try harder to find the file to patch on file creation (issue2041)
accept the following patch header:
first line: foo/a.orig
second line: foo/a
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Fri, 19 Mar 2010 22:52:38 +0100 |
parents | 7a5931c5f2dc |
children | fb06e357e698 |
comparison
equal
deleted
inserted
replaced
10742:0e8403f4ce31 | 10745:d94832c4a31d |
---|---|
349 --- proj-orig/foo 1969-12-31 16:00:00.000000000 -0800 | 349 --- proj-orig/foo 1969-12-31 16:00:00.000000000 -0800 |
350 +++ proj-new/foo 2009-07-17 16:50:45.801368000 -0700 | 350 +++ proj-new/foo 2009-07-17 16:50:45.801368000 -0700 |
351 @@ -0,0 +1,1 @@ | 351 @@ -0,0 +1,1 @@ |
352 +a | 352 +a |
353 EOF | 353 EOF |
354 # some people have patches like the following too | |
355 cat > create2.patch <<EOF | |
356 diff -Naur proj-orig/foo proj-new/foo | |
357 --- proj-orig/foo.orig 1969-12-31 16:00:00.000000000 -0800 | |
358 +++ proj-new/foo 2009-07-17 16:50:45.801368000 -0700 | |
359 @@ -0,0 +1,1 @@ | |
360 +a | |
361 EOF | |
354 hg init oddcreate | 362 hg init oddcreate |
355 cd oddcreate | 363 cd oddcreate |
356 hg import --no-commit ../create.patch | 364 hg import --no-commit ../create.patch |
365 cat foo | |
366 rm foo | |
367 hg revert foo | |
368 hg import --no-commit ../create2.patch | |
357 cat foo | 369 cat foo |
358 | 370 |
359 echo % 'first line mistaken for email headers (issue 1859)' | 371 echo % 'first line mistaken for email headers (issue 1859)' |
360 hg init emailconfusion | 372 hg init emailconfusion |
361 cd emailconfusion | 373 cd emailconfusion |