Our group has email addresses as https usernames, so they contain '@'. This
leads to commands like:
hg clone http://mjc%40example.com@hg.example.com/repo/...
The clone works fine, but it puts the URL into .hgrc verbatim, which leads to
the following stack trace when running hg in the working directory:
File ".../site-packages/mercurial/ui.py", line 166, in readconfig
self.fixconfig(root=root)
File ".../site-packages/mercurial/ui.py", line 207, in fixconfig
pathsitems = cdata.items('paths')
File ".../python2.5/ConfigParser.py", line 557, in items
for option in options]
File ".../site-packages/mercurial/util.py", line 137, in _interpolate
option, rawval, vars)
File ".../python2.5/ConfigParser.py", line 593, in _interpolate
self._interpolate_some(option, L, rawval, section, vars, 1)
File ".../python2.5/ConfigParser.py", line 634, in _interpolate_some
"'%%' must be followed by '%%' or '(', found: %r" % (rest,))
ConfigParser.InterpolationSyntaxError: '%' must be followed by '%' or '(',
found: '%40example.com@hg.example.com/repo'
The same would happen for any URL-encoded username. Suggested fix attached. |