quoting of names in .hgrc
Stefan van der Walt
stefan at sun.ac.za
Mon Sep 5 06:20:30 CDT 2005
I often forget that strings arn't quoted in .hgrc. My username then
is parsed as "blah at blah.com" instead of blah at blah.com.
Would it be viable to run the user string through two simple regular
expressions first, in order to remove quote marks? Something like
q1 = re.compile('^"[^"]*"$')
q2 = re.compile("^'[^']*'$")
if (re.match(q1, name) or re.match(q2, name)):
name = name[1:-1]
This way, names like Me "Nickname" <...> or "Me" Myself "I" are left
intact, but the quotes are removed from names like "asdads
<blah at blah.com>".
More information about the Mercurial