Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.8, 0.8.1, and 0.8.2

hgemail: add --inline/--attach/--diffstat configurables

Changeset e258f71e5139

Parent f8957400c013

by Steve Borho

Changes to one file · Browse files at e258f71e5139 Showing diff from parent f8957400c013 Diff from another changeset...

Change 1 of 4 Show Entire File hggtk/​hgemail.py Stacked
 
137
138
139
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
140
141
142
 
220
221
222
 
 
 
223
224
225
 
231
232
233
 
 
 
 
 
 
 
 
 
234
235
236
 
307
308
309
 
 
 
310
311
312
 
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
 
236
237
238
239
240
241
242
243
244
 
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
 
335
336
337
338
339
340
341
342
343
@@ -137,6 +137,22 @@
  ' Upstream users can pull from them. This is the safest'   ' way to send changes to recipient Mercurial users.'))   + hbox = gtk.HBox() + vbox.pack_start(hbox, False, False, 2) + + self._attach = gtk.CheckButton(_('attach')) + self.tooltips.set_tip(self._attach, + _('send patches as attachments')) + self._inline = gtk.CheckButton(_('inline')) + self.tooltips.set_tip(self._inline, + _('send patches as inline attachments')) + self._diffstat = gtk.CheckButton(_('diffstat')) + self.tooltips.set_tip(self._diffstat, + _('add diffstat output to messages')) + hbox.pack_start(self._attach, True, True, 2) + hbox.pack_start(self._inline, True, True, 2) + hbox.pack_start(self._diffstat, True, True, 2) +   vbox = gtk.VBox()   hbox = gtk.HBox()   self._subjlist = gtk.ListStore(str) @@ -220,6 +236,9 @@
  self._git.set_sensitive(True)   self._bundle.set_sensitive(True)   self._plain.set_sensitive(True) + self._inline.set_sensitive(True) + self._attach.set_sensitive(True) + self._diffstat.set_sensitive(True)   defaults = repo.ui.config('defaults', 'email', '').split()   for flag in defaults:   if flag in ('-g', '--git'): @@ -231,6 +250,15 @@
  if flag in ('--plain'):   self._plain.set_active(True)   self._plain.set_sensitive(False) + if flag in ('i', '--inline'): + self._inline.set_active(True) + self._inline.set_sensitive(False) + if flag in ('a', '--attach'): + self._attach.set_active(True) + self._attach.set_sensitive(False) + if flag in ('d', '--diffstat'): + self._diffstat.set_active(True) + self._diffstat.set_sensitive(False)     def _on_conf_clicked(self, button):   dlg = ConfigDialog(self.root, False) @@ -307,6 +335,9 @@
  self.revargs.remove('--outgoing')   elif self._plain.get_active(): cmdline += ['--plain']   elif self._git.get_active(): cmdline += ['--git'] + if self._inline.get_active(): cmdline += ['--inline'] + if self._attach.get_active(): cmdline += ['--attach'] + if self._diffstat.get_active(): cmdline += ['--diffstat']   start = self.descbuffer.get_start_iter()   end = self.descbuffer.get_end_iter()   desc = self.descbuffer.get_text(start, end)