コード例 #1
0
    def source(self):
        returnCommits = []
        if not self.config.getboolean('Git', 'External', fallback=False):
            return returnCommits

        for confSect in list(self.config.branches.values()):
            branch = confSect.name
            tmpDir = TemporaryDirectory()
            self.tmpDirs.append(tmpDir)
            source = self.config.repoPath
            cloneSource = source

            dbLog = filterOnStatusBase(
                "external", filterOnSource(source, self.dbBe.getAllCommits()))
            dbLog = sorted(dbLog, key=lambda commit: commit.date)

            with SSHEnvironment(cloneSource, self.config) as sshCloneSource:
                if not sshCloneSource is None:
                    cloneSource = sshCloneSource
                try:
                    returnCommits += self._doClone(source, cloneSource, branch,
                                                   tmpDir.name, dbLog)
                except CalledProcessError as err:
                    syslog(
                        LOG_WARNING,
                        "CalledProcessError for branch '%s' in '%s': '%s'" %
                        (branch, source, err))

            return returnCommits
コード例 #2
0
	def source(self):
		returnCommits = []
		if not self.config.getboolean('Git', 'External', fallback=False):
			return returnCommits

		for confSect in self.config.branches.values():
			branch = confSect.name
			tmpDir = TemporaryDirectory()
			self.tmpDirs.append(tmpDir)
			source = self.config.repoPath
			cloneSource = source

			dbLog = filterOnStatusBase("external", filterOnSource(source, self.dbBe.getAllCommits()))
			dbLog = sorted(dbLog, key=lambda commit: commit.date)

			with SSHEnvironment(cloneSource, self.config) as sshCloneSource:
				if not sshCloneSource is None:
					cloneSource = sshCloneSource
				try:
					returnCommits += self._doClone(source, cloneSource, branch, tmpDir.name, dbLog)
				except CalledProcessError as err:
					syslog(LOG_WARNING, "CalledProcessError for branch '%s' in '%s': '%s'"% (branch, source, err))

			return returnCommits
コード例 #3
0
	def store(self, commits):
		commits = gitdhutils.filterOnStatusBase('databaselog', commits)
		gitdhutils.mInsertCommit(self.dbBe, commits)
コード例 #4
0
	def store(self, commits):
		mInsertCommit(self.dbBe, filterOnStatusBase('external', commits))
コード例 #5
0
 def store(self, commits):
     commits = gitdhutils.filterOnStatusBase('databaselog', commits)
     gitdhutils.mInsertCommit(self.dbBe, commits)
コード例 #6
0
 def store(self, commits):
     mInsertCommit(self.dbBe, filterOnStatusBase('external', commits))