[issue2147] Cannot escape white space nor comma in configuration

Ubaldo Villaseca bugs at mercurial.selenic.com
Tue Apr 20 22:38:50 UTC 2010


New submission from Ubaldo Villaseca <villas82 at gmail.com>:

The value of the keys, in the Mercurial configuration file, cannot contain
commas nor white spaces, since those are value separators. There must be a
way to escape the separator characters.

Multiple troubles could arise because of this bug. For example, you can't
enable Windows Authentication with Mercurial if you have user names with
white spaces between the last and first name. The following repository
configuration won't work:

[web]
push_ssl=true
allow_read=john doe, james brown
allow_push=john doe

The quick workaround for me was this:

--- mercurial-1.5.1/mercurial/ui.py	Thu Apr  1 18:49:38 2010
+++ Mercurial/lib/mercurial/ui.py	Tue Apr 13 03:18:11 2010
@@ -158,7 +158,7 @@
         if result is None:
             result = default or []
         if isinstance(result, basestring):
-            result = result.replace(",", " ").split()
+            result = result.split(',')
         return result
 
     def has_section(self, section, untrusted=False):

----------
messages: 12332
nosy: ubaldo
priority: bug
status: unread
title: Cannot escape white space nor comma in configuration

____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue2147>
____________________________________________________


More information about the Mercurial-devel mailing list