Escape '%' when writing to hgrc (issue1199)
Fixes clone with paths containing '%'.
Patch provided by mjc.
abort: Failed to parse .../t/.hg/hgrc
File contains no section headers.
file: .../t/.hg/hgrc, line: 1
'invalid\n'
updating working directory
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
[paths]
default = .../foo%%bar
default = .../foo%bar
bundle.mainreporoot=.../foobar
defaults.backout=-d "0 0"
defaults.commit=-d "0 0"
defaults.debugrawcommit=-d "0 0"
defaults.tag=-d "0 0"
paths.default=.../foo%bar
ui.slash=True