mercurial/hg.py
changeset 7044 e51c0f41f271
parent 6338 0750f11152fe
child 7045 f82938c87b92
child 7048 25961e53a07f
--- a/mercurial/hg.py	Thu Sep 18 13:55:58 2008 +0200
+++ b/mercurial/hg.py	Sat Sep 20 15:00:58 2008 +0200
@@ -239,7 +239,8 @@
         if dest_repo.local():
             fp = dest_repo.opener("hgrc", "w", text=True)
             fp.write("[paths]\n")
-            fp.write("default = %s\n" % abspath)
+            # percent needs to be escaped for ConfigParser
+            fp.write("default = %s\n" % abspath.replace('%', '%%'))
             fp.close()
 
             if update: