equal
deleted
inserted
replaced
157 break |
157 break |
158 desc.append(line) |
158 desc.append(line) |
159 if not node: |
159 if not node: |
160 raise ValueError |
160 raise ValueError |
161 |
161 |
162 if opts['attach']: |
162 if opts.get('attach'): |
163 body = ('\n'.join(desc[1:]).strip() or |
163 body = ('\n'.join(desc[1:]).strip() or |
164 'Patch subject is complete summary.') |
164 'Patch subject is complete summary.') |
165 body += '\n\n\n' |
165 body += '\n\n\n' |
166 |
166 |
167 if opts.get('plain'): |
167 if opts.get('plain'): |
188 patchname = cmdutil.make_filename(repo, '%b-%n.patch', |
188 patchname = cmdutil.make_filename(repo, '%b-%n.patch', |
189 binnode, idx, total) |
189 binnode, idx, total) |
190 else: |
190 else: |
191 patchname = cmdutil.make_filename(repo, '%b.patch', binnode) |
191 patchname = cmdutil.make_filename(repo, '%b.patch', binnode) |
192 disposition = 'inline' |
192 disposition = 'inline' |
193 if opts['attach']: |
193 if opts.get('attach'): |
194 disposition = 'attachment' |
194 disposition = 'attachment' |
195 p['Content-Disposition'] = disposition + '; filename=' + patchname |
195 p['Content-Disposition'] = disposition + '; filename=' + patchname |
196 msg.attach(p) |
196 msg.attach(p) |
197 else: |
197 else: |
198 body += '\n'.join(patch) |
198 body += '\n'.join(patch) |