changeset 1528:4e28e01f57da

meta: force date and extra fields to be purely bytes
author Augie Fackler <raf@durin42.com>
date Thu, 31 Aug 2017 01:18:48 -0400
parents d03995e69785
children dee572a4e30b
files hgsubversion/svnmeta.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/svnmeta.py
+++ b/hgsubversion/svnmeta.py
@@ -375,6 +375,7 @@ class SVNMeta(object):
 
     def fixdate(self, date):
         if date is not None:
+            date = util.forceutf8(date)
             date = date.replace('T', ' ').replace('Z', '').split('.')[0]
             date += ' -0000'
             self.lastdate = date
@@ -410,8 +411,8 @@ class SVNMeta(object):
             extra['branch'] = branch
 
         extra['convert_revision'] = 'svn:%(uuid)s%(path)s@%(rev)s' % {
-            'uuid': self.uuid,
-            'path': path,
+            'uuid': util.forceutf8(self.uuid),
+            'path': util.forceutf8(path),
             'rev': revnum,
         }
         return extra