Mercurial > hg
comparison tests/test-import @ 10883:196908117c27 stable
patch: don't look for headers in diff lines
If you have a diff line that matches a header line, the patch splitter
currently breaks your patch at this line. For example a line like:
+key: value
This can lead to "malformed patch" exceptions. Now fixed.
author | Peter Arrenbrecht <peter.arrenbrecht@gmail.com> |
---|---|
date | Fri, 09 Apr 2010 20:34:05 +0200 |
parents | c52057614c72 |
children | f5be44090ba8 |
comparison
equal
deleted
inserted
replaced
10878:c63a6ddbbf9a | 10883:196908117c27 |
---|---|
472 new mode 100755 | 472 new mode 100755 |
473 EOF | 473 EOF |
474 hg sum | 474 hg sum |
475 hg diff --git -c tip | 475 hg diff --git -c tip |
476 cd .. | 476 cd .. |
477 | |
478 echo '% diff lines looking like headers' | |
479 hg init difflineslikeheaders | |
480 cd difflineslikeheaders | |
481 echo a >a | |
482 echo b >b | |
483 echo c >c | |
484 hg ci -Am1 | |
485 | |
486 echo "key: value" >>a | |
487 echo "key: value" >>b | |
488 echo "foo" >>c | |
489 hg ci -m2 | |
490 | |
491 hg up -C 0 | |
492 hg diff --git -c1 >want | |
493 hg diff -c1 | hg import --no-commit - | |
494 hg diff --git >have | |
495 diff want have | |
496 cd .. | |
497 |