comparison tests/test-import @ 5344:cc34be74eeec

Merge with crew-stable.
author Bryan O'Sullivan <bos@serpentine.com>
date Sat, 29 Sep 2007 21:10:54 -0700
parents a7915f79d4cc
children 9b469bdb1ce1
comparison
equal deleted inserted replaced
5343:26692d08c2f9 5344:cc34be74eeec
91 hg --cwd a export tip > tip.patch 91 hg --cwd a export tip > tip.patch
92 python mkmsg.py | hg --cwd b import - 92 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
99 hg --cwd a ci -u someoneelse -d '1 0' -m'subdir change' 117 hg --cwd a ci -u someoneelse -d '1 0' -m'subdir change'
100 echo % hg import in a subdirectory 118 echo % hg import in a subdirectory