From 5c5c830a870645e37966e36871cf54eb95fde445 Mon Sep 17 00:00:00 2001 From: Gregory Szorc Date: Wed, 31 Jul 2013 00:07:57 -0700 Subject: [PATCH] Bug 899818 - Don't add quotes to values when writing Mercurial configs; r=Gijs DONTBUILD (NPOTB) --- tools/mercurial/hgsetup/config.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/mercurial/hgsetup/config.py b/tools/mercurial/hgsetup/config.py index 2a18ed50dacd..b5b20ef50d2e 100644 --- a/tools/mercurial/hgsetup/config.py +++ b/tools/mercurial/hgsetup/config.py @@ -17,8 +17,12 @@ class MercurialConfig(object): def __init__(self, infile=None): """Create a new instance, optionally from an existing hgrc file.""" + # write_empty_values is necessary to prevent built-in extensions (which + # have no value) from being dropped on write. + # list_values aren't needed by Mercurial and disabling them prevents + # quotes from being added. self._c = ConfigObj(infile=infile, encoding='utf-8', - write_empty_values=True) + write_empty_values=True, list_values=False) @property def config(self):