comparison mercurial/config.py @ 20789:d19c9bdbbf35

config: don't set source when no source is specified - don't overwrite with '' This prevents ui.fixconfig from overwriting the source of paths and it will thus show up in showconfig --debug.
author Mads Kiilerich <madski@unity3d.com>
date Wed, 19 Mar 2014 02:45:14 +0100
parents 7d82ad4b3727
children c2262004c2e2
comparison
equal deleted inserted replaced
20788:f144928dd058 20789:d19c9bdbbf35
91 return self._data.get(section, {}).items() 91 return self._data.get(section, {}).items()
92 def set(self, section, item, value, source=""): 92 def set(self, section, item, value, source=""):
93 if section not in self: 93 if section not in self:
94 self._data[section] = sortdict() 94 self._data[section] = sortdict()
95 self._data[section][item] = value 95 self._data[section][item] = value
96 self._source[(section, item)] = source 96 if source:
97 self._source[(section, item)] = source
97 98
98 def restore(self, data): 99 def restore(self, data):
99 """restore data returned by self.backup""" 100 """restore data returned by self.backup"""
100 if len(data) == 4: 101 if len(data) == 4:
101 # restore old data 102 # restore old data