Show More
@@ -135,17 +135,17 b' def patchbomb(ui, repo, *revs, **opts):' | |||||
135 | msg = email.MIMEMultipart.MIMEMultipart() |
|
135 | msg = email.MIMEMultipart.MIMEMultipart() | |
136 | if body: msg.attach(email.MIMEText.MIMEText(body, 'plain')) |
|
136 | if body: msg.attach(email.MIMEText.MIMEText(body, 'plain')) | |
137 | p = email.MIMEText.MIMEText('\n'.join(patch), 'x-patch') |
|
137 | p = email.MIMEText.MIMEText('\n'.join(patch), 'x-patch') | |
138 | node = bin(node) |
|
138 | binnode = bin(node) | |
139 | # if node is mq patch, it will have patch file name as tag |
|
139 | # if node is mq patch, it will have patch file name as tag | |
140 | patchname = [t for t in repo.nodetags(node) |
|
140 | patchname = [t for t in repo.nodetags(binnode) | |
141 | if t.endswith('.patch') or t.endswith('.diff')] |
|
141 | if t.endswith('.patch') or t.endswith('.diff')] | |
142 | if patchname: |
|
142 | if patchname: | |
143 | patchname = patchname[0] |
|
143 | patchname = patchname[0] | |
144 | elif total > 1: |
|
144 | elif total > 1: | |
145 | patchname = commands.make_filename(repo, '%b-%n.patch', |
|
145 | patchname = commands.make_filename(repo, '%b-%n.patch', | |
146 | node, idx, total) |
|
146 | binnode, idx, total) | |
147 | else: |
|
147 | else: | |
148 | patchname = commands.make_filename(repo, '%b.patch', node) |
|
148 | patchname = commands.make_filename(repo, '%b.patch', binnode) | |
149 | p['Content-Disposition'] = 'inline; filename=' + patchname |
|
149 | p['Content-Disposition'] = 'inline; filename=' + patchname | |
150 | msg.attach(p) |
|
150 | msg.attach(p) | |
151 | else: |
|
151 | else: |
General Comments 0
You need to be logged in to leave comments.
Login now