changeset 4781:38bf55d2e41f

Merge with tah
author Brendan Cully <brendan@kublai.com>
date Mon, 02 Jul 2007 22:34:38 -0700
parents 169fe1e6104c (current diff) a7915f79d4cc (diff)
children 37e11c768db9
files
diffstat 2 files changed, 29 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-import	Mon Jul 02 22:33:48 2007 -0700
+++ b/tests/test-import	Mon Jul 02 22:34:38 2007 -0700
@@ -93,6 +93,24 @@
 hg --cwd b tip | grep second
 rm -r b
 
+# subject: duplicate detection, removal of [PATCH]
+cat > mkmsg2.py <<EOF
+import email.Message, sys
+msg = email.Message.Message()
+msg.set_payload('email patch\n\nnext line\n' + open('tip.patch').read())
+msg['Subject'] = '[PATCH] email patch'
+msg['From'] = 'email patcher'
+sys.stdout.write(msg.as_string())
+EOF
+
+echo '% plain diff in email, [PATCH] subject, message body with subject'
+hg clone -r0 a b
+hg --cwd a diff -r0:1 > tip.patch
+python mkmsg2.py | hg --cwd b import -
+hg --cwd b tip --template '{desc}\n'
+rm -r b
+
+
 # bug non regression test
 # importing a patch in a subdirectory failed at the commit stage
 echo line 2 >> a/d1/d2/a
--- a/tests/test-import.out	Mon Jul 02 22:33:48 2007 -0700
+++ b/tests/test-import.out	Mon Jul 02 22:34:38 2007 -0700
@@ -100,6 +100,17 @@
 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
 applying patch from stdin
 summary:     second change
+% plain diff in email, [PATCH] subject, message body with subject
+requesting all changes
+adding changesets
+adding manifests
+adding file changes
+added 1 changesets with 2 changes to 2 files
+2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+applying patch from stdin
+email patch
+
+next line
 % hg import in a subdirectory
 requesting all changes
 adding changesets