def commits(self, branch):
    '\n        获取分支的commits\n\n        @param branch:\n        @param kwargs:\n        @return:\n        '
    self.checkout_2_branch(branch)
    commit_log = PyGit.Git(self.path).log('--pretty=%h #@_@# %an #@_@# %s', max_count=50)
    commit_list = commit_log.split('\n')
    commits = []
    for commit in commit_list:
        if (not re.search('^.+ #@_@# .+ #@_@# .*$', commit)):
            continue
        commit_dict = commit.split(' #@_@# ')
        from flask import current_app
        current_app.logger.info(commit_dict)
        commits.append({'id': commit_dict[0], 'name': commit_dict[1], 'message': commit_dict[2]})
    return commits
获取分支的commits

@param branch:
@param kwargs:
@return:
def commits(self, branch):
    '\n        获取分支的commits\n\n        @param branch:\n        @param kwargs:\n        @return:\n        '
    self.checkout_2_branch(branch)
    commit_log = PyGit.Git(self.path).log('--pretty=%h #@_@# %an #@_@# %s', max_count=50)
    commit_list = commit_log.split('\n')
    commits = []
    for commit in commit_list:
        if (not re.search('^.+ #@_@# .+ #@_@# .*$', commit)):
            continue
        commit_dict = commit.split(' #@_@# ')
        from flask import current_app
        current_app.logger.info(commit_dict)
        commits.append({'id': commit_dict[0], 'name': commit_dict[1], 'message': commit_dict[2]})
    return commits