Show More
@@ -93,6 +93,24 b' python mkmsg.py | hg --cwd b import -' | |||||
93 | hg --cwd b tip | grep second |
|
93 | hg --cwd b tip | grep second | |
94 | rm -r b |
|
94 | rm -r b | |
95 |
|
95 | |||
|
96 | # subject: duplicate detection, removal of [PATCH] | |||
|
97 | cat > mkmsg2.py <<EOF | |||
|
98 | import email.Message, sys | |||
|
99 | msg = email.Message.Message() | |||
|
100 | msg.set_payload('email patch\n\nnext line\n' + open('tip.patch').read()) | |||
|
101 | msg['Subject'] = '[PATCH] email patch' | |||
|
102 | msg['From'] = 'email patcher' | |||
|
103 | sys.stdout.write(msg.as_string()) | |||
|
104 | EOF | |||
|
105 | ||||
|
106 | echo '% plain diff in email, [PATCH] subject, message body with subject' | |||
|
107 | hg clone -r0 a b | |||
|
108 | hg --cwd a diff -r0:1 > tip.patch | |||
|
109 | python mkmsg2.py | hg --cwd b import - | |||
|
110 | hg --cwd b tip --template '{desc}\n' | |||
|
111 | rm -r b | |||
|
112 | ||||
|
113 | ||||
96 | # bug non regression test |
|
114 | # bug non regression test | |
97 | # importing a patch in a subdirectory failed at the commit stage |
|
115 | # importing a patch in a subdirectory failed at the commit stage | |
98 | echo line 2 >> a/d1/d2/a |
|
116 | echo line 2 >> a/d1/d2/a |
@@ -100,6 +100,17 b' added 1 changesets with 2 changes to 2 f' | |||||
100 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
100 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
101 | applying patch from stdin |
|
101 | applying patch from stdin | |
102 | summary: second change |
|
102 | summary: second change | |
|
103 | % plain diff in email, [PATCH] subject, message body with subject | |||
|
104 | requesting all changes | |||
|
105 | adding changesets | |||
|
106 | adding manifests | |||
|
107 | adding file changes | |||
|
108 | added 1 changesets with 2 changes to 2 files | |||
|
109 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
110 | applying patch from stdin | |||
|
111 | email patch | |||
|
112 | ||||
|
113 | next line | |||
103 | % hg import in a subdirectory |
|
114 | % hg import in a subdirectory | |
104 | requesting all changes |
|
115 | requesting all changes | |
105 | adding changesets |
|
116 | adding changesets |
General Comments 0
You need to be logged in to leave comments.
Login now