comparison wrappers.py @ 276:b45bae16be32

clone: Fix url-escaping for new config parser
author Augie Fackler <durin42@gmail.com>
date Fri, 24 Apr 2009 20:26:00 -0500
parents 5278817fe8a1
children 60acc38eac96
comparison
equal deleted inserted replaced
275:68aea59116b6 276:b45bae16be32
211 if os.path.exists(dest): 211 if os.path.exists(dest):
212 repo = hg.repository(ui, dest) 212 repo = hg.repository(ui, dest)
213 fp = repo.opener("hgrc", "w", text=True) 213 fp = repo.opener("hgrc", "w", text=True)
214 fp.write("[paths]\n") 214 fp.write("[paths]\n")
215 # percent needs to be escaped for ConfigParser 215 # percent needs to be escaped for ConfigParser
216 fp.write("default = %(url)s\nsvn = %(url)s\n" % {'url': svnurl.replace('%', '%%')}) 216 fp.write("default = %(url)s\nsvn = %(url)s\n" % {'url': svnurl})
217 fp.close() 217 fp.close()
218 if (res is None or res == 0) and not opts.get('noupdate', False): 218 if (res is None or res == 0) and not opts.get('noupdate', False):
219 commands.update(ui, repo, repo['tip'].node()) 219 commands.update(ui, repo, repo['tip'].node())
220 220
221 return res 221 return res