Simon H. committed a0530bb

hgemail: only send intro message when there is a message

the subject for one single patch can be changed in patchbomb

Comments (0)

Files changed (1)

             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:
         start = self.descbuffer.get_start_iter()
         end = self.descbuffer.get_end_iter()
         desc = self.descbuffer.get_text(start, end)
+        if desc and self._intro:
+            cmdline += ['--intro']
             fd, tmpfile = tempfile.mkstemp(prefix="thg_emaildesc_")
             os.write(fd, desc)