diff mercurial/ui.py @ 13576:edd06611a7c6

ui: yield unchanged values in walkconfig Ever since walkconfig was introduced back in 25e7ea0f2cff, the values yielded has been mutated by replacing "\n" with "\\n". This makes walkconfig less useful than it could and there is no other way to iterate over all config sections. The third-party reposettings extension used ui.walkconfig but did not take the replacement into account -- this change will actually fix a bug in the extension when a value contains a newline.
author Martin Geisler <mg@aragost.com>
date Thu, 10 Mar 2011 16:49:37 +0100
parents 95b0d4c1c9e1
children 1ce0e80799c0
line wrap: on
line diff
--- a/mercurial/ui.py	Thu Mar 10 13:43:47 2011 +0100
+++ b/mercurial/ui.py	Thu Mar 10 16:49:37 2011 +0100
@@ -273,7 +273,7 @@
         cfg = self._data(untrusted)
         for section in cfg.sections():
             for name, value in self.configitems(section, untrusted):
-                yield section, name, str(value).replace('\n', '\\n')
+                yield section, name, value
 
     def plain(self):
         '''is plain mode active?