# HG changeset patch
# User Simon Heimberg <[email protected]>
# Date 1238149238 -3600
# Node ID e263d5874e3a7151698a41f241d74ff2e4aca11e
# Parent d3334761f6e67028b47c04caf0c4a42c559bd01a
hgemail: send intro email for one patch if supported and subject given
diff -r d3334761f6e6 -r e263d5874e3a hggtk/hgemail.py
--- a/hggtk/hgemail.py Fre Mär 27 11:20:37 2009 +0100
+++ b/hggtk/hgemail.py Fre Mär 27 11:20:38 2009 +0100
@@ -159,12 +159,7 @@
eventbox = gtk.EventBox()
eventbox.add(vbox)
frame.add(eventbox)
- self.tooltips.set_tip(eventbox,
- _('Patch series description is sent in initial summary'
- ' email with [PATCH 0 of N] subject. It should describe'
- ' the effects of the entire patch series. When emailing'
- ' a bundle, these fields make up the message subject and body.'
- ' The description field is unused when sending a single
patch'))
+ self._eventbox = eventbox
mainvbox.pack_start(frame, True, True, 4)
self.connect('map_event', self._on_window_map_event)
@@ -203,6 +198,22 @@
self._ccbox.child.set_text(fromutf(repo.ui.config('email', 'cc',
'')))
self._frombox.child.set_text(fromutf(repo.ui.config('email',
'from', '')))
self._subjbox.child.set_text(fromutf(repo.ui.config('email',
'subject', '')))
+ self._intro = False
+ for arg in extensions.find('patchbomb').cmdtable['email'][1]:
+ if arg[1] == 'intro':
+ self._intro = True
+ break
+ if self._intro:
+ addtip = ''
+ else:
+ addtip = ' ' + _('The description field is unused '
+ 'when sending a single patch.')
+ self.tooltips.set_tip(self._eventbox,
+ _('Patch series description is sent in initial summary'
+ ' email with [PATCH 0 of N] subject. It should describe'
+ ' the effects of the entire patch series. When emailing'
+ ' a bundle, these fields make up the message subject and
body.')
+ + addtip)
fill_history(history, self._tolist, 'email.to')
fill_history(history, self._cclist, 'email.cc')
fill_history(history, self._fromlist, 'email.from')
@@ -291,6 +302,8 @@
cmdline.insert(2, '--test')
if subjtext:
cmdline += ['--subject', subjtext]
+ if self._intro:
+ cmdline += ['--intro']
if self._bundle.get_active():
cmdline += ['--bundle']
if '--outgoing' in self.revargs:
------------------------------------------------------------------------------
_______________________________________________
Tortoisehg-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop