diff fetch_command.py @ 223:330f0b15d417

issue67: mercurial 1.3 util incompatibility with encoding swap
author Luke Opperman <luke@loppear.com>
date Tue, 07 Apr 2009 13:30:05 -0500
parents a360ddc97719
children f71af18c4379
line wrap: on
line diff
--- a/fetch_command.py
+++ b/fetch_command.py
@@ -29,8 +29,7 @@ def fetch_revisions(ui, svn_url, hg_repo
     """pull new revisions from Subversion
     """
     svn_url = util.normalize_url(svn_url)
-    old_encoding = merc_util._encoding
-    merc_util._encoding = 'UTF-8'
+    old_encoding = util.swap_out_encoding()
     skipto_rev=int(skipto_rev)
     have_replay = not stupid
     if have_replay and not callable(
@@ -107,7 +106,8 @@ def fetch_revisions(ui, svn_url, hg_repo
                         ui.status('Got a 502, retrying (%s)\n' % tries)
                     else:
                         raise
-    merc_util._encoding = old_encoding
+    util.swap_out_encoding(old_encoding)
+
 fetch_revisions = util.register_subcommand('pull')(fetch_revisions)