Mercurial > hgsubversion
changeset 946:289f2c7752a8
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.
author | Patrick Mezard <patrick@mezard.eu> |
---|---|
date | Fri, 12 Oct 2012 21:30:24 +0200 |
parents | bfbfc9be3faa |
children | e1cb98792cf4 |
files | hgsubversion/wrappers.py |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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)