Beispiel #1
0
def get_component_tag_info(comp, sb, tag):
    if tag is None:
        print("Please specify a tag with the -t option")
        return 1
    has_tag = []
    same_revision = {}
    aspects = get_vcs_component_aspects(comp, sb)
    for a in aspects:
        path = sb.get_component_path(comp, a)
        txt = vcs.tags(path)
        if txt:
            if tag in txt:
                has_tag.append(_get_relative_path(sb, comp, a))
            txt = [x.split() for x in txt.split('\n')]
            revision = None
            for t in txt:
                if tag in t:
                    revision = t[1]
                    break
            if revision:
                for t in txt:
                    if t[1] == revision:
                        if _get_relative_path(sb, comp, a) in same_revision:
                            same_revision[_get_relative_path(sb, comp,
                                                             a)].append(t[0])
                        else:
                            same_revision[_get_relative_path(sb, comp,
                                                             a)] = [t[0]]
    return has_tag, same_revision
Beispiel #2
0
def get_component_tag_info(comp, sb, tag):
    if tag is None:
        print("Please specify a tag with the -t option")
        return 1
    has_tag = []
    same_revision = {}
    aspects = get_vcs_component_aspects(comp, sb)
    for a in aspects:
        path = sb.get_component_path(comp, a)
        txt = vcs.tags(path)
        if txt:
            if tag in txt:
                has_tag.append(_get_relative_path(sb, comp, a))
            txt = [x.split() for x in txt.split('\n')]
            revision = None
            for t in txt:
                if tag in t:
                    revision = t[1]
                    break
            if revision:
                for t in txt:
                    if t[1] == revision:
                        if _get_relative_path(sb, comp, a) in same_revision:
                            same_revision[_get_relative_path(sb, comp, a)].append(t[0])
                        else:
                            same_revision[_get_relative_path(sb, comp, a)] = [t[0]]
    return has_tag, same_revision
Beispiel #3
0
def show_component_tags(comp, sb):
    aspects = get_vcs_component_aspects(comp, sb)
    for a in aspects:
        path = sb.get_component_path(comp, a)
        print('  ' + _get_relative_path(sb, comp, a))
        txt = vcs.tags(path)
        if txt:
            print('\n'.join(['    ' + l.rstrip() for l in txt.split('\n')]))
Beispiel #4
0
def show_component_tags(comp, sb):
    aspects = get_vcs_component_aspects(comp, sb)
    for a in aspects:
        path = sb.get_component_path(comp, a)
        print('  ' + _get_relative_path(sb, comp, a))
        txt = vcs.tags(path)
        if txt:
            print('\n'.join(['    ' + l.rstrip() for l in txt.split('\n')]))