~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/config.py

  • Committer: Vincent Ladeuil
  • Date: 2011-12-29 10:46:38 UTC
  • mto: This revision was merged to the branch mainline in revision 6425.
  • Revision ID: v.ladeuil+lp@free.fr-20111229104638-5vl40mg0h2ngfzch
Setting or removing an option records the section as dirty

Show diffs side-by-side

added added

removed removed

Lines of Context:
3025
3025
        """
3026
3026
        super(IniFileStore, self).__init__()
3027
3027
        self._config_obj = None
 
3028
        # Which sections need to be saved
 
3029
        self.dirty_sections = []
3028
3030
 
3029
3031
    def is_loaded(self):
3030
3032
        return self._config_obj != None
3117
3119
            section = self._config_obj
3118
3120
        else:
3119
3121
            section = self._config_obj.setdefault(section_id, {})
3120
 
        return self.mutable_section_class(section_id, section)
 
3122
        mutable_section = self.mutable_section_class(section_id, section)
 
3123
        # All mutable sections can become dirty
 
3124
        self.dirty_sections.append(mutable_section)
 
3125
        return mutable_section
3121
3126
 
3122
3127
    def quote(self, value):
3123
3128
        try: