def filter(self, commits): commits = filterOnStatusExt('queued', commits) branches = {} for commit in commits: if not commit.branch in branches: branches[commit.branch] = [] branches[commit.branch].append(commit) for branch in list(branches.values()): sortedCommits = sorted(branch, key=lambda commit: commit.date) for commit in sortedCommits[:-1]: self._removeCommit(commit)
def filter(self, commits): commits = filterOnStatusExt('queued', commits) branches = {} for commit in commits: if not commit.branch in branches: branches[commit.branch] = [] branches[commit.branch].append(commit) for branch in branches.values(): sortedCommits = sorted(branch, key=lambda commit: commit.date) for commit in sortedCommits[:-1]: self._removeCommit(commit)
def process(self, commits): commits = filterOnStatusExt('queued', commits) for commit in commits: if not self.dbBe is None: self.dbBe.setStatusWorking(commit) confSection = self.config.branches[commit.branch] rmIntGitFiles = confSection.getboolean('RmIntGitFiles', True) recursive = confSection.getboolean('Recursive', True) if not hasattr(commit, 'deploymentSource'): commit.deploymentSource = self.config.repoPath syslog(LOG_INFO, "Deploying commit '%s' from '%s' : '%s' to '%s'" % (commit, commit.repository, commit.branch, confSection['Path'])) self._deleteUpdateRepo(confSection['Path'], commit.deploymentSource, commit.branch, commit, rmIntGitFiles=rmIntGitFiles, recursive=recursive) if not self.dbBe is None: self.dbBe.setStatusFinished(commit)