Exemple #1
0
 def load(self):
     """
     load - override load hook to read the users .gitconfig file
     """
     if self.gitconfig_file is None:
         self.gitconfig_file = os.path.join(os.environ['HOME'], '.gitconfig')
     self.config = load_gitconfig(self.gitconfig_file)
Exemple #2
0
 def setup_load(self):
     if self.gitconfig_file is None:
         self.gitconfig_file = os.path.join(os.environ['HOME'],
                                            '.gitconfig')
     self.gitconfig = load_gitconfig(self.gitconfig_file)
     self.gitconfig.add_section('cirrus')
     self._load_creds_plugin()
Exemple #3
0
 def load(self):
     """
     load - override load hook to read the users .gitconfig file
     """
     if self.gitconfig_file is None:
         self.gitconfig_file = os.path.join(os.environ['HOME'],
                                            '.gitconfig')
     self.config = load_gitconfig(self.gitconfig_file)
Exemple #4
0
    def load(self):
        """
        _load_from_file_

        Reread the cirrus config file

        """
        self.parser = ConfigParser.RawConfigParser()
        self.parser.read(self.config_file)
        for section in self.parser.sections():
            self.setdefault(section, {})
            for option in self.parser.options(section):
                self[section].setdefault(option,
                                         self.parser.get(section, option))
        if self.gitconfig_file is None:
            self.gitconfig_file = os.path.join(os.environ['HOME'],
                                               '.gitconfig')
        self.gitconfig = load_gitconfig(self.gitconfig_file)
        self._load_creds_plugin()
Exemple #5
0
    def load(self):
        """
        _load_from_file_

        Reread the cirrus config file

        """
        self.parser = ConfigParser.RawConfigParser()
        self.parser.read(self.config_file)
        for section in self.parser.sections():
            self.setdefault(section, {})
            for option in self.parser.options(section):
                self[section].setdefault(
                    option,
                    self.parser.get(section, option)
                )
        if self.gitconfig_file is None:
            self.gitconfig_file = os.path.join(os.environ['HOME'], '.gitconfig')
        self.gitconfig = load_gitconfig(self.gitconfig_file)
        self._load_creds_plugin()
Exemple #6
0
 def setup_load(self):
     if self.gitconfig_file is None:
         self.gitconfig_file = os.path.join(os.environ['HOME'], '.gitconfig')
     self.gitconfig = load_gitconfig(self.gitconfig_file)
     self.gitconfig.add_section('cirrus')
     self._load_creds_plugin()
Exemple #7
0
 def test_reading_config2(self):
     gc = load_gitconfig(filename=self.file_2)
     self.assertTrue('push' in gc.sections)
     self.assertTrue('pull' in gc.sections)
     self.assertTrue('alias' in gc.sections)