mercurial/hg.py
changeset 7048 25961e53a07f
parent 6944 7e5f3480c45b
parent 7044 e51c0f41f271
child 7050 6788608627c4
--- a/mercurial/hg.py	Wed Sep 17 22:15:36 2008 +0200
+++ b/mercurial/hg.py	Mon Sep 22 14:47:21 2008 +0200
@@ -223,7 +223,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: