diff tests/test-import @ 7247:c4461ea8b4c8

patch: fix patched files records in externalpatcher()
author Patrick Mezard <pmezard@gmail.com>
date Sun, 26 Oct 2008 17:26:28 +0100
parents 87c704ac92d4
children bffdab64dfbb
line wrap: on
line diff
--- a/tests/test-import	Sun Oct 26 14:02:32 2008 +0100
+++ b/tests/test-import	Sun Oct 26 17:26:28 2008 +0100
@@ -20,6 +20,18 @@
 hg --cwd b tip | grep someone
 rm -r b
 
+echo % import exported patch with external patcher
+cat > dummypatch.py <<EOF
+print 'patching file a'
+file('a', 'wb').write('line2\n')
+EOF
+chmod +x dummypatch.py
+hg clone -r0 a b
+hg --cwd a export tip > tip.patch
+hg --config ui.patch='python ../dummypatch.py' --cwd b import ../tip.patch
+cat b/a
+rm -r b
+
 echo % import of plain diff should fail without message
 hg clone -r0 a b
 hg --cwd a diff -r0:1 > tip.patch