示例#1
0
def _from_git(distribution):
    option_dict = distribution.get_option_dict("pbr")
    changelog = git._iter_log_oneline()
    if changelog:
        changelog = git._iter_changelog(changelog)
    git.write_git_changelog(option_dict=option_dict, changelog=changelog)
    git.generate_authors(option_dict=option_dict)
示例#2
0
def _from_git(distribution):
    option_dict = distribution.get_option_dict('pbr')
    changelog = git._iter_log_oneline()
    if changelog:
        changelog = git._iter_changelog(changelog)
    git.write_git_changelog(option_dict=option_dict, changelog=changelog)
    git.generate_authors(option_dict=option_dict)
示例#3
0
def _get_revno_and_last_tag(git_dir):
    """Return the commit data about the most recent tag.

    We use git-describe to find this out, but if there are no
    tags then we fall back to counting commits since the beginning
    of time.
    """
    changelog = git._iter_log_oneline(git_dir=git_dir)
    row_count = 0
    for row_count, (ignored, tag_set, ignored) in enumerate(changelog):
        version_tags = set()
        for tag in list(tag_set):
            try:
                version_tags.add(version.SemanticVersion.from_pip_string(tag))
            except Exception:
                pass
        if version_tags:
            return max(version_tags).release_string(), row_count
    return "", row_count
示例#4
0
def _get_revno_and_last_tag(git_dir):
    """Return the commit data about the most recent tag.

    We use git-describe to find this out, but if there are no
    tags then we fall back to counting commits since the beginning
    of time.
    """
    changelog = git._iter_log_oneline(git_dir=git_dir)
    row_count = 0
    for row_count, (ignored, tag_set, ignored) in enumerate(changelog):
        version_tags = set()
        for tag in list(tag_set):
            try:
                version_tags.add(version.SemanticVersion.from_pip_string(tag))
            except Exception:
                pass
        if version_tags:
            return max(version_tags).release_string(), row_count
    return "", row_count