diff fetch_command.py @ 44:85fcac4e2291

Fix an encoding bug that would occur if the local encoding was not utf-8.
author Augie Fackler <durin42@gmail.com>
date Tue, 28 Oct 2008 11:39:36 -0500
parents 485ae93bc358
children a8b9c7e7c2ac
line wrap: on
line diff
--- a/fetch_command.py
+++ b/fetch_command.py
@@ -29,6 +29,8 @@ def fetch_revisions(ui, svn_url, hg_repo
                     **opts):
     """Pull new revisions from Subversion.
     """
+    old_encoding = merc_util._encoding
+    merc_util._encoding = 'UTF-8'
     skipto_rev=int(skipto_rev)
     have_replay = not stupid
     if have_replay and not callable(delta.svn_txdelta_apply(None, None,
@@ -101,6 +103,7 @@ def fetch_revisions(ui, svn_url, hg_repo
                         ui.status('Got a 502, retrying (%s)\n' % tries)
                     else:
                         raise
+    merc_util._encoding = old_encoding
 
 
 def cleanup_file_handles(svn, count):