comparison 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
comparison
equal deleted inserted replaced
222:f2c65dd3d5c0 223:330f0b15d417
27 filemap=None, 27 filemap=None,
28 **opts): 28 **opts):
29 """pull new revisions from Subversion 29 """pull new revisions from Subversion
30 """ 30 """
31 svn_url = util.normalize_url(svn_url) 31 svn_url = util.normalize_url(svn_url)
32 old_encoding = merc_util._encoding 32 old_encoding = util.swap_out_encoding()
33 merc_util._encoding = 'UTF-8'
34 skipto_rev=int(skipto_rev) 33 skipto_rev=int(skipto_rev)
35 have_replay = not stupid 34 have_replay = not stupid
36 if have_replay and not callable( 35 if have_replay and not callable(
37 delta.svn_txdelta_apply(None, None, None)[0]): #pragma: no cover 36 delta.svn_txdelta_apply(None, None, None)[0]): #pragma: no cover
38 ui.status('You are using old Subversion SWIG bindings. Replay will not' 37 ui.status('You are using old Subversion SWIG bindings. Replay will not'
105 ' in response to PROPFIND') in e.message: 104 ' in response to PROPFIND') in e.message:
106 tries += 1 105 tries += 1
107 ui.status('Got a 502, retrying (%s)\n' % tries) 106 ui.status('Got a 502, retrying (%s)\n' % tries)
108 else: 107 else:
109 raise 108 raise
110 merc_util._encoding = old_encoding 109 util.swap_out_encoding(old_encoding)
110
111 fetch_revisions = util.register_subcommand('pull')(fetch_revisions) 111 fetch_revisions = util.register_subcommand('pull')(fetch_revisions)
112 112
113 113
114 def cleanup_file_handles(svn, count): 114 def cleanup_file_handles(svn, count):
115 if count % 50 == 0: 115 if count % 50 == 0: