Mercurial > hg
comparison hgext/patchbomb.py @ 14290:86e70956da4f
cmdutil: make_filename -> makefilename
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 10 May 2011 16:08:46 -0500 |
parents | 924c82157d46 |
children | 37e80214badf |
comparison
equal
deleted
inserted
replaced
14289:d68ddccf276b | 14290:86e70956da4f |
---|---|
117 patchtags = [t for t in repo.nodetags(binnode) | 117 patchtags = [t for t in repo.nodetags(binnode) |
118 if t.endswith('.patch') or t.endswith('.diff')] | 118 if t.endswith('.patch') or t.endswith('.diff')] |
119 if patchtags: | 119 if patchtags: |
120 patchname = patchtags[0] | 120 patchname = patchtags[0] |
121 elif total > 1: | 121 elif total > 1: |
122 patchname = cmdutil.make_filename(repo, '%b-%n.patch', | 122 patchname = cmdutil.makefilename(repo, '%b-%n.patch', |
123 binnode, seqno=idx, total=total) | 123 binnode, seqno=idx, total=total) |
124 else: | 124 else: |
125 patchname = cmdutil.make_filename(repo, '%b.patch', binnode) | 125 patchname = cmdutil.makefilename(repo, '%b.patch', binnode) |
126 disposition = 'inline' | 126 disposition = 'inline' |
127 if opts.get('attach'): | 127 if opts.get('attach'): |
128 disposition = 'attachment' | 128 disposition = 'attachment' |
129 p['Content-Disposition'] = disposition + '; filename=' + patchname | 129 p['Content-Disposition'] = disposition + '; filename=' + patchname |
130 msg.attach(p) | 130 msg.attach(p) |