Mercurial > public > mercurial-scm > hg
diff tests/test-import.t @ 12675:c6cdc123f6e4
patch: fails immediately upon malformed hunk
patch(1) does silently ignore malformed hunks but this is not something we want
to copy.
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Sat, 09 Oct 2010 15:13:08 -0500 |
parents | 4fee1fd3de9a |
children | b00eda50ad2b |
line wrap: on
line diff
--- a/tests/test-import.t Sat Oct 09 15:13:08 2010 -0500 +++ b/tests/test-import.t Sat Oct 09 15:13:08 2010 -0500 @@ -150,6 +150,25 @@ $ rm -r b +import of malformed plain diff should fail + + $ hg clone -r0 a b + requesting all changes + adding changesets + adding manifests + adding file changes + added 1 changesets with 2 changes to 2 files + updating to branch default + 2 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ hg --cwd a diff -r0:1 > tip.patch + $ sed 's/1,1/foo/' < tip.patch > broken.patch + $ hg --cwd b import -mpatch ../broken.patch + applying ../broken.patch + abort: bad hunk #1 + [255] + $ rm -r b + + hg -R repo import put the clone in a subdir - having a directory named "a" used to hide a bug.