示例#1
0
文件: Git.py 项目: PhilMiller/bcfg2
 def __init__(self, core, datastore):
     Version.__init__(self, core, datastore)
     if HAS_GITPYTHON:
         self.repo = git.Repo(self.vcs_root)
     else:
         self.logger.debug("Git: GitPython not found, using CLI interface "
                           "to Git")
         self.repo = None
     self.logger.debug("Initialized git plugin with git directory %s" %
                       self.vcs_path)
示例#2
0
 def __init__(self, core):
     Version.__init__(self, core)
     if HAS_GITPYTHON:
         self.repo = git.Repo(Bcfg2.Options.setup.vcs_root)
         self.cmd = None
     else:
         self.logger.debug("Git: GitPython not found, using CLI interface "
                           "to Git")
         self.repo = None
         self.cmd = Executor()
     self.logger.debug("Initialized git plugin with git directory %s" %
                       self.vcs_path)