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 --in-reply-to feature

Changeset fc220a4eb1db

Parent d7cc1eff08cd

by Steve Borho

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

Change 1 of 8 Show Entire File hggtk/​hgemail.py Stacked
 
56
57
58
59
 
60
61
62
 
73
74
75
76
 
77
78
79
 
84
85
86
87
 
88
89
90
 
95
96
97
98
 
99
100
101
102
103
 
 
 
 
 
 
 
 
 
 
 
104
105
106
 
211
212
213
 
214
215
216
217
 
 
218
219
220
 
287
288
289
 
290
291
292
 
323
324
325
326
327
328
329
 
342
343
344
 
 
345
346
347
 
56
57
58
 
59
60
61
62
 
73
74
75
 
76
77
78
79
 
84
85
86
 
87
88
89
90
 
95
96
97
 
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
 
222
223
224
225
226
227
228
 
229
230
231
232
233
 
300
301
302
303
304
305
306
 
337
338
339
 
340
341
342
 
355
356
357
358
359
360
361
362
@@ -56,7 +56,7 @@
  self.set_title(_('Email revision(s) ') + ' '.join(revargs[1:]))   else:   self.set_title(_('Email Mercurial Patches')) - self.set_default_size(630, 400) + self.set_default_size(650, 450)     hbox = gtk.HBox()   envframe = gtk.Frame(_('Envelope')) @@ -73,7 +73,7 @@
  self._tolist = gtk.ListStore(str)   self._tobox = gtk.ComboBoxEntry(self._tolist, 0)   lbl = gtk.Label(_('To:')) - lbl.set_property('width-chars', 5) + lbl.set_property('width-chars', 10)   lbl.set_alignment(1.0, 0.5)   hbox.pack_start(lbl, False, False, 4)   hbox.pack_start(self._tobox, True, True, 4) @@ -84,7 +84,7 @@
  self._cclist = gtk.ListStore(str)   self._ccbox = gtk.ComboBoxEntry(self._cclist, 0)   lbl = gtk.Label(_('Cc:')) - lbl.set_property('width-chars', 5) + lbl.set_property('width-chars', 10)   lbl.set_alignment(1.0, 0.5)   hbox.pack_start(lbl, False, False, 4)   hbox.pack_start(self._ccbox, True, True, 4) @@ -95,12 +95,23 @@
  self._fromlist = gtk.ListStore(str)   self._frombox = gtk.ComboBoxEntry(self._fromlist, 0)   lbl = gtk.Label(_('From:')) - lbl.set_property('width-chars', 5) + lbl.set_property('width-chars', 10)   lbl.set_alignment(1.0, 0.5)   hbox.pack_start(lbl, False, False, 4)   hbox.pack_start(self._frombox, True, True, 4)   vbox.pack_start(hbox, False, False, 4)   + hbox = gtk.HBox() + self._replyto = gtk.Entry() + lbl = gtk.Label(_('In-Reply-To:')) + lbl.set_property('width-chars', 10) + lbl.set_alignment(1.0, 0.5) + hbox.pack_start(lbl, False, False, 4) + hbox.pack_start(self._replyto, True, True, 4) + vbox.pack_start(hbox, False, False, 4) + self.tips.set_tip(self._replyto, + _('Message identifier to reply to, for threading')) +   vbox = gtk.VBox()   flagframe.add(vbox)   @@ -211,10 +222,12 @@
  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 + self._in_reply_to = False   for arg in extensions.find('patchbomb').cmdtable['email'][1]:   if arg[1] == 'intro':   self._intro = True - break + elif arg[1] == 'in-reply-to': + self._in_reply_to = True   if self._intro:   addtip = ''   else: @@ -287,6 +300,7 @@
  cctext = fromutf(self._ccbox.child.get_text())   fromtext = fromutf(self._frombox.child.get_text())   subjtext = fromutf(self._subjbox.child.get_text()) + inreplyto = fromutf(self._replyto.get_text())     if not totext:   info_dialog(self, _('Info required'), @@ -323,7 +337,6 @@
  history.write()     cmdline = ['hg', 'email', '-f', fromtext, '-t', totext, '-c', cctext] - cmdline += ['--repository', self.repo.root]   oldpager = os.environ.get('PAGER')   if test:   if oldpager: @@ -342,6 +355,8 @@
  if self._inline.get_active(): cmdline += ['--inline']   if self._attach.get_active(): cmdline += ['--attach']   if self._diffstat.get_active(): cmdline += ['--diffstat'] + if inreplyto and self._in_reply_to: + cmdline += ['--in-reply-to', inreplyto]   start = self.descbuffer.get_start_iter()   end = self.descbuffer.get_end_iter()   desc = self.descbuffer.get_text(start, end)