[issue1199] hg clone with '@' in http username
Michael Cahill
mercurial-bugs at selenic.com
Wed Jun 25 00:59:48 UTC 2008
New submission from Michael Cahill <mjc at cahill.net.au>:
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 at hg.example.com/repo'
The same would happen for any URL-encoded username. Suggested fix attached.
----------
files: fix-http-at-username.diff
messages: 6401
nosy: mjc
priority: bug
status: unread
title: hg clone with '@' in http username
____________________________________________________
Mercurial issue tracker <mercurial-bugs at selenic.com>
<http://www.selenic.com/mercurial/bts/issue1199>
____________________________________________________
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fix-http-at-username.diff
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-devel/attachments/20080625/55bc32f8/attachment.diff>
More information about the Mercurial-devel
mailing list