##// END OF EJS Templates
patchbomb: no traceback if (diffstat) confirmation is refused
Christian Ebert -
r5479:f7c99e89 default
parent child Browse files
Show More
@@ -130,9 +130,9 b' def patchbomb(ui, repo, *revs, **opts):'
130 if empty_ok: return r
130 if empty_ok: return r
131 ui.warn(_('Please enter a valid value.\n'))
131 ui.warn(_('Please enter a valid value.\n'))
132
132
133 def confirm(s):
133 def confirm(s, denial):
134 if not prompt(s, default = 'y', rest = '? ').lower().startswith('y'):
134 if not prompt(s, default = 'y', rest = '? ').lower().startswith('y'):
135 raise ValueError
135 raise util.Abort(denial)
136
136
137 def cdiffstat(summary, patchlines):
137 def cdiffstat(summary, patchlines):
138 s = patch.diffstat(patchlines)
138 s = patch.diffstat(patchlines)
@@ -140,7 +140,8 b' def patchbomb(ui, repo, *revs, **opts):'
140 if summary:
140 if summary:
141 ui.write(summary, '\n')
141 ui.write(summary, '\n')
142 ui.write(s, '\n')
142 ui.write(s, '\n')
143 confirm(_('Does the diffstat above look okay'))
143 confirm(_('Does the diffstat above look okay'),
144 _('diffstat rejected'))
144 elif s is None:
145 elif s is None:
145 ui.warn(_('No diffstat information available.\n'))
146 ui.warn(_('No diffstat information available.\n'))
146 s = ''
147 s = ''
General Comments 0
You need to be logged in to leave comments. Login now