Patchwork [2,of,3,STABLE] py3: use raw string to query EmailMessage in gnuarch converter

login
register
mail settings
Submitter Denis Laxalde
Date Nov. 4, 2019, 9:18 a.m.
Message ID <e0e912bb2453e0338070.1572859125@marimba>
Download mbox | patch
Permalink /patch/42706/
State Accepted
Headers show

Comments

Denis Laxalde - Nov. 4, 2019, 9:18 a.m.
# HG changeset patch
# User Denis Laxalde <denis@laxalde.org>
# Date 1572857770 -3600
#      Mon Nov 04 09:56:10 2019 +0100
# Branch stable
# Node ID e0e912bb2453e033807000be5a5c648efef72d59
# Parent  b09e0c3c51f1d819eaaec188a5c9e26219294586
py3: use raw string to query EmailMessage in gnuarch converter

Patch

diff --git a/hgext/convert/gnuarch.py b/hgext/convert/gnuarch.py
--- a/hgext/convert/gnuarch.py
+++ b/hgext/convert/gnuarch.py
@@ -302,22 +302,22 @@  class gnuarch_source(common.converter_so
 
             # Commit date
             self.changes[rev].date = dateutil.datestr(
-                dateutil.strdate(catlog[b'Standard-date'], b'%Y-%m-%d %H:%M:%S')
+                dateutil.strdate(catlog[r'Standard-date'], b'%Y-%m-%d %H:%M:%S')
             )
 
             # Commit author
-            self.changes[rev].author = self.recode(catlog[b'Creator'])
+            self.changes[rev].author = self.recode(catlog[r'Creator'])
 
             # Commit description
             self.changes[rev].summary = b'\n\n'.join(
-                (catlog[b'Summary'], catlog.get_payload())
+                (catlog[r'Summary'], catlog.get_payload())
             )
             self.changes[rev].summary = self.recode(self.changes[rev].summary)
 
             # Commit revision origin when dealing with a branch or tag
-            if b'Continuation-of' in catlog:
+            if r'Continuation-of' in catlog:
                 self.changes[rev].continuationof = self.recode(
-                    catlog[b'Continuation-of']
+                    catlog[r'Continuation-of']
                 )
         except Exception:
             raise error.Abort(_(b'could not parse cat-log of %s') % rev)