Details
Details
- Reviewers
- None
- Group Reviewers
hg-reviewers - Commits
- rHG2161faf0d24b: patchbomb: use native strings when determining attachment disposition
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
| hg-reviewers |
| Lint Skipped |
| Unit Tests Skipped |
| Path | Packages | |||
|---|---|---|---|---|
| M | hgext/patchbomb.py (7 lines) |
| Commit | Parents | Author | Summary | Date |
|---|---|---|---|---|
| Augie Fackler | Aug 9 2018, 9:57 PM |
| if t.endswith('.patch') or t.endswith('.diff')] | if t.endswith('.patch') or t.endswith('.diff')] | ||||
| if patchtags: | if patchtags: | ||||
| patchname = patchtags[0] | patchname = patchtags[0] | ||||
| elif total > 1: | elif total > 1: | ||||
| patchname = cmdutil.makefilename(repo[node], '%b-%n.patch', | patchname = cmdutil.makefilename(repo[node], '%b-%n.patch', | ||||
| seqno=idx, total=total) | seqno=idx, total=total) | ||||
| else: | else: | ||||
| patchname = cmdutil.makefilename(repo[node], '%b.patch') | patchname = cmdutil.makefilename(repo[node], '%b.patch') | ||||
| disposition = 'inline' | disposition = r'inline' | ||||
| if opts.get('attach'): | if opts.get('attach'): | ||||
| disposition = 'attachment' | disposition = r'attachment' | ||||
| p['Content-Disposition'] = disposition + '; filename=' + patchname | p[r'Content-Disposition'] = ( | ||||
| disposition + r'; filename=' + encoding.strfromlocal(patchname)) | |||||
| msg.attach(p) | msg.attach(p) | ||||
| else: | else: | ||||
| msg = mail.mimetextpatch(body, display=opts.get('test')) | msg = mail.mimetextpatch(body, display=opts.get('test')) | ||||
| prefix = _formatprefix(ui, repo, rev, opts.get('flag'), idx, total, | prefix = _formatprefix(ui, repo, rev, opts.get('flag'), idx, total, | ||||
| numbered) | numbered) | ||||
| subj = desc[0].strip().rstrip('. ') | subj = desc[0].strip().rstrip('. ') | ||||
| if not numbered: | if not numbered: | ||||