# HG changeset patch # User Patrick Mezard # Date 1350070224 -7200 # Node ID 289f2c7752a8e613150d76898df3cbc7f926d109 # Parent bfbfc9be3faad8df304660c312bc11d103e95e94 push: reset encoding before the final update Before a9f315eae67c, all the rebase sequence including the update was executed with the encoding reset to the native one. After the change, the final update was left out and ran with UTF-8, which fails for some badly shaped repository. Reset the correct encoding context. diff --git a/hgsubversion/wrappers.py b/hgsubversion/wrappers.py --- a/hgsubversion/wrappers.py +++ b/hgsubversion/wrappers.py @@ -286,7 +286,11 @@ def push(repo, dest, force, revs): meta = repo.svnmeta(svn.uuid, svn.subdir) hashes = meta.revmap.hashes() - hg.update(repo, repo['tip'].node()) + util.swap_out_encoding(old_encoding) + try: + hg.update(repo, repo['tip'].node()) + finally: + util.swap_out_encoding() repair.strip(ui, repo, to_strip, "all") finally: util.swap_out_encoding(old_encoding)