本文整理汇总了Python中git.Repo.commits_since方法的典型用法代码示例。如果您正苦于以下问题:Python Repo.commits_since方法的具体用法?Python Repo.commits_since怎么用?Python Repo.commits_since使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类git.Repo
的用法示例。
在下文中一共展示了Repo.commits_since方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Path
# 需要导入模块: from git import Repo [as 别名]
# 或者: from git.Repo import commits_since [as 别名]
dels=dels
)
else:
return {}
# ----- Main script begins here -----------
for root in GIT_DIRS:
p = Path(root)
change_dict = {}
for gitdir in p.walk(filter=contains_git):
repo = Repo(str(gitdir.absolute()))
try:
s = '%i-%i-%i' % (begins.year, begins.month, begins.day)
for commit in repo.commits_since(since=s):
if commit.author.email.lower() not in GIT_AUTHOR_EMAILS:
continue
cd = gen_commit_dict(commit)
if cd:
if repo not in change_dict:
change_dict[repo] = {}
change_dict[repo][commit] = cd
except (GitCommandError, AttributeError) as e:
pass
if change_dict:
title = 'SUMMARY OF GIT ACTIVITIES FROM %s to %s' % (str(begins.date()), str(now.date()))
body = gen_change_str(change_dict)
send_mail(title, body)