# HG changeset patch # User Augie Fackler # Date 1504156699 14400 # Node ID d03995e697854fe9cfe79ba2a7b958327f56469e # Parent 5adfb81c46806e811a9552f7929d5c81938879ea meta: force user and message to be bytes diff --git a/hgsubversion/replay.py b/hgsubversion/replay.py --- a/hgsubversion/replay.py +++ b/hgsubversion/replay.py @@ -185,10 +185,10 @@ def _convert_rev(ui, meta, svn, r, tbdel extra['branch'] = 'default' current_ctx = context.memctx(meta.repo, parents, - meta.getmessage(rev), + util.forceutf8(meta.getmessage(rev)), [util.forceutf8(f) for f in files.keys()], filectxfn, - meta.authors[rev.author], + util.forceutf8(meta.authors[rev.author]), date, extra) @@ -225,10 +225,10 @@ def _convert_rev(ui, meta, svn, r, tbdel current_ctx = context.memctx(meta.repo, (ha, node.nullid), - meta.getmessage(rev), + util.forceutf8(meta.getmessage(rev)), [util.forceutf8(f) for f in files], del_all_files, - meta.authors[rev.author], + util.forceutf8(meta.authors[rev.author]), date, extra) new_hash = meta.repo.svn_commitctx(current_ctx) diff --git a/hgsubversion/stupid.py b/hgsubversion/stupid.py --- a/hgsubversion/stupid.py +++ b/hgsubversion/stupid.py @@ -783,10 +783,10 @@ def convert_rev(ui, meta, svn, r, tbdelt current_ctx = context.memctx( meta.repo, [parentctx.node(), revlog.nullid], - meta.getmessage(r), + util.forceutf8(meta.getmessage(r)), [util.forceutf8(f) for f in files_touched], filectxfn, - meta.authors[r.author], + util.forceutf8(meta.authors[r.author]), date, extra) ha = meta.repo.svn_commitctx(current_ctx) diff --git a/hgsubversion/svnmeta.py b/hgsubversion/svnmeta.py --- a/hgsubversion/svnmeta.py +++ b/hgsubversion/svnmeta.py @@ -458,7 +458,7 @@ class SVNMeta(object): return path def getmessage(self, rev): - msg = rev.message + msg = util.forceutf8(rev.message) if msg: try: @@ -816,7 +816,7 @@ class SVNMeta(object): self.getmessage(rev), ['.hgtags', ], hgtagsfn, - self.authors[rev.author], + util.forceutf8(self.authors[rev.author]), date, parentctx.extra()) new_hash = self.repo.svn_commitctx(ctx) @@ -884,7 +884,7 @@ class SVNMeta(object): self.getmessage(rev), ['.hgtags'], fctxfun, - self.authors[rev.author], + util.forceutf8(self.authors[rev.author]), date, extra) new = self.repo.svn_commitctx(ctx) @@ -906,7 +906,7 @@ class SVNMeta(object): self.getmessage(rev), [], lambda x, y, z: None, - self.authors[rev.author], + util.forceutf8(self.authors[rev.author]), self.fixdate(rev.date), extra) new = self.repo.svn_commitctx(ctx)