Added ui.configlist method to get comma/space separated lists of strings.
For example:
users = alice, bob
colors = red green blue
--- a/mercurial/ui.py Mon Jun 26 14:49:18 2006 +0200
+++ b/mercurial/ui.py Mon Jun 26 14:52:26 2006 +0200
@@ -95,6 +95,15 @@
else:
return self.parentui.config(section, name, default)
+ def configlist(self, section, name, default=None):
+ """Return a list of comma/space separated strings"""
+ result = self.config(section, name)
+ if result is None:
+ return []
+ else:
+ return result.replace(",", " ").split()
+
+
def configbool(self, section, name, default=False):
if self.overlay.has_key((section, name)):
return self.overlay[(section, name)]