コード例 #1
0
    def __init__ (self, repo, filter_arg, date_start=None, date_end=None):
        self.repo        = repo
        self.filter_arg  = filter_arg
        self.commits_all = gitlog.get_commits (repo)
        self.date_start  = date_start or self.get_first_commit()
        self.date_end    = date_end   or self.get_latest_commit()

        # Filtered commits
        self.commits_filtered = self._filter_commits (filter_arg)
        self.commits          = self._get_filtered_commits_by_date (self.commits_filtered,
                                                                    self.date_start,
                                                                    self.date_end)
コード例 #2
0
def main():
    # Process independent projects
    for project in  projects.get_project_list():
        print ("Processing %s" %(project))
        gitlog.generate_cache_file (project)

    # Combine projects
    openstack = []
    for project in  projects.get_project_list():
        openstack += gitlog.get_commits (project)

    openstack = sorted (openstack, key=lambda c: c['committer_date'])

    print ("Generating the global OpenStack project cache")
    gitlog.save_cache_file ("openstack", openstack)
コード例 #3
0
def get_all_releases_dicts ():
    # Add a 'global' release
    rel = releases[:]
    rel += [{"name":   "Global",
             "period": (rel[0]['period'][0],
                        rel[-1]['period'][1]),
             "projects": ["openstack"]}]

    # Figure out project on each release
    for project in projects.get_project_list():
        commits = gitlog.get_commits (project)
        for r in rel:
            commits_release = [c for c in commits
                               if (c['author_date'] >= r['period'][0] and
                                   c['author_date'] <= r['period'][1])]
            if len(commits_release) > 1:
                r['projects'].append (project)

    return rel