changeset 43382:cf3bf3b03445 stable

py3: use mail.parsebytes() in gnuarch catlog parser We drop 'catlogparser' attribute now unused.
author Denis Laxalde <denis@laxalde.org>
date Mon, 04 Nov 2019 09:52:13 +0100
parents 9a43cef9ec59
children 0f890ce15888
files hgext/convert/gnuarch.py
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/convert/gnuarch.py	Mon Nov 04 09:35:10 2019 +0100
+++ b/hgext/convert/gnuarch.py	Mon Nov 04 09:52:13 2019 +0100
@@ -7,7 +7,6 @@
 # GNU General Public License version 2 or any later version.
 from __future__ import absolute_import
 
-import email.parser as emailparser
 import os
 import shutil
 import stat
@@ -17,6 +16,7 @@
 from mercurial import (
     encoding,
     error,
+    mail,
     pycompat,
     util,
 )
@@ -69,7 +69,6 @@
         self.changes = {}
         self.parents = {}
         self.tags = {}
-        self.catlogparser = emailparser.Parser()
         self.encoding = encoding.encoding
         self.archives = []
 
@@ -299,7 +298,7 @@
 
     def _parsecatlog(self, data, rev):
         try:
-            catlog = self.catlogparser.parsestr(data)
+            catlog = mail.parsebytes(data)
 
             # Commit date
             self.changes[rev].date = dateutil.datestr(