[PATCH] patch: remove email import workaround for Python 2.4

Gregory Szorc gregory.szorc at gmail.com
Mon Jun 22 17:09:43 UTC 2015


# HG changeset patch
# User Gregory Szorc <gregory.szorc at gmail.com>
# Date 1434992948 25200
#      Mon Jun 22 10:09:08 2015 -0700
# Node ID 2af150f19ecdc93659d81a644b5aa1f417167647
# Parent  7fdd1782fc4ee9da87d8af13e806dc9055db2c38
patch: remove email import workaround for Python 2.4

Python 2.6 provides access to the sub-modules just fine. This workaround
is no longer needed since we no longer support Python 2.4.

diff --git a/mercurial/patch.py b/mercurial/patch.py
--- a/mercurial/patch.py
+++ b/mercurial/patch.py
@@ -8,12 +8,8 @@
 
 import collections
 import cStringIO, email, os, errno, re, posixpath, copy
 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, short
 import base85, mdiff, scmutil, util, diffhelpers, copies, encoding, error


More information about the Mercurial-devel mailing list