diff --git a/mercurial/ui.py b/mercurial/ui.py --- a/mercurial/ui.py +++ b/mercurial/ui.py @@ -309,7 +309,7 @@ class ui(object): sections.sort() for section in sections: for name, value in self.configitems(section, untrusted): - yield section, name, value.replace('\n', '\\n') + yield section, name, str(value).replace('\n', '\\n') def extensions(self): result = self.configitems("extensions") diff --git a/tests/test-hook b/tests/test-hook --- a/tests/test-hook +++ b/tests/test-hook @@ -203,4 +203,6 @@ hg ci -m 'add foo' echo >> foo hg ci --debug -m 'change foo' | sed -e 's/ at .*>/>/' +hg showconfig hooks | sed -e 's/ at .*>/>/' + exit 0 diff --git a/tests/test-hook.out b/tests/test-hook.out --- a/tests/test-hook.out +++ b/tests/test-hook.out @@ -142,3 +142,4 @@ Automatically installed hook foo calling hook commit.auto: Automatically installed hook +hooks.commit.auto=