Пример #1
0
    def config_writer(self):
        """
        :return: GitConfigParser compatible object able to write options for this remote.
        :note:
            You can only own one writer at a time - delete it to release the
            configuration file and make it useable by others.

            To assure consistent results, you should only query options through the
            writer. Once you are done writing, you are free to use the config reader
            once again."""
        writer = self.repo.config_writer()

        # clear our cache to assure we re-read the possibly changed configuration
        try:
            del (self._config_reader)
        except AttributeError:
            pass
        #END handle exception
        return SectionConstraint(writer, self._config_section_name())
Пример #2
0
 def _set_cache_(self, attr):
     if attr == "_config_reader":
         self._config_reader = SectionConstraint(
             self.repo.config_reader(), self._config_section_name())
     else:
         super(Remote, self)._set_cache_(attr)