diff --git a/hgext/notify.py b/hgext/notify.py --- a/hgext/notify.py +++ b/hgext/notify.py @@ -134,6 +134,9 @@ web.baseurl ''' import email, socket, time +# On python2.4 you have to import this by name or they fail to +# load. This was not a problem on Python 2.7. +import email.Parser from mercurial.i18n import _ from mercurial import patch, cmdutil, templater, util, mail import fnmatch diff --git a/hgext/patchbomb.py b/hgext/patchbomb.py --- a/hgext/patchbomb.py +++ b/hgext/patchbomb.py @@ -47,6 +47,11 @@ hgrc(5) for details. import os, errno, socket, tempfile, cStringIO import email +# On python2.4 you have to import these by name or they fail to +# load. This was not a problem on Python 2.7. +import email.Generator +import email.MIMEMultipart + from mercurial import cmdutil, commands, hg, mail, patch, util from mercurial import scmutil from mercurial.i18n import _ diff --git a/mercurial/mail.py b/mercurial/mail.py --- a/mercurial/mail.py +++ b/mercurial/mail.py @@ -9,6 +9,10 @@ from i18n import _ import util, encoding, sslutil import os, smtplib, socket, quopri, time, sys import email +# On python2.4 you have to import these by name or they fail to +# load. This was not a problem on Python 2.7. +import email.Header +import email.MIMEText _oldheaderinit = email.Header.Header.__init__ def _unifiedheaderinit(self, *args, **kw): diff --git a/mercurial/patch.py b/mercurial/patch.py --- a/mercurial/patch.py +++ b/mercurial/patch.py @@ -8,6 +8,10 @@ import cStringIO, email, os, errno, re, posixpath import tempfile, zlib, shutil +# On python2.4 you have to import these by name or they fail to +# load. This was not a problem on Python 2.7. +import email.Generator +import email.Parser from i18n import _ from node import hex, nullid, short