Ejemplo n.º 1
0
def main(args):
    handle_arguments(args)
    set_up_logging(OPTIONS)

    branchinfo = _run('bzr fast-branches ' + OPTIONS.reporoot)
    branchinfo = [b.split() for b in branchinfo.split('\n') if b.strip()]

    if OPTIONS.branch:
        branchinfo = [b for b in branchinfo if b[0].lower() == OPTIONS.branch.lower()]

    if OPTIONS.component:
        branchinfo = [b for b in branchinfo if b[1].lower() == OPTIONS.component.lower()]

    if OPTIONS.branches:
        show(branchinfo, BRANCH)
    elif OPTIONS.components:
        show(branchinfo, COMPONENT)
    elif OPTIONS.aspects:
        show(branchinfo, ASPECT)
    else:
        print('Branches:')
        show(branchinfo, BRANCH, indent=True)

        print('\nComponents:')
        show(branchinfo, COMPONENT, indent=True)

        print('\nAspects:')
        show(branchinfo, ASPECT, indent=True)
Ejemplo n.º 2
0
def main(args):
    handle_arguments(args)
    set_up_logging(OPTIONS)

    branchinfo = _run('bzr fast-branches ' + OPTIONS.reporoot)
    branchinfo = [b.split() for b in branchinfo.split('\n') if b.strip()]

    if OPTIONS.branch:
        branchinfo = [
            b for b in branchinfo if b[0].lower() == OPTIONS.branch.lower()
        ]

    if OPTIONS.component:
        branchinfo = [
            b for b in branchinfo if b[1].lower() == OPTIONS.component.lower()
        ]

    if OPTIONS.branches:
        show(branchinfo, BRANCH)
    elif OPTIONS.components:
        show(branchinfo, COMPONENT)
    elif OPTIONS.aspects:
        show(branchinfo, ASPECT)
    else:
        print('Branches:')
        show(branchinfo, BRANCH, indent=True)

        print('\nComponents:')
        show(branchinfo, COMPONENT, indent=True)

        print('\nAspects:')
        show(branchinfo, ASPECT, indent=True)
Ejemplo n.º 3
0
def main(args):
    handle_arguments(args)
    set_up_logging(OPTIONS)

    branchname = OPTIONS.branch

    print('Retrieving master branch information from', MASTER_SERVER)
    master_branches = get_branch_info(MASTER_SERVER, OPTIONS.branch)


    print('Retrieving site branch information from', OPTIONS.site)
    site_branches = get_branch_info(OPTIONS.site, OPTIONS.branch)

    print('Processing')
    for branch in site_branches:
        b = find_branch(master_branches, branch)
        if not b:
            print('ERROR: branch missing from master:', branch.branch, branch.component, branch.aspect, branch.revid)
        else:
            if b.revid == branch.revid:
                master_branches.remove(b)
            else:
                b.site_revid = branch.revid

    print('\nSite Information for', OPTIONS.branch if OPTIONS.branch else 'all branches')
    print('    %d items out of date' % len(master_branches))
    for b in master_branches:
        print( '        ', b.branch, b.component, b.aspect)
        print( '            master revid:', b.revid)
        print( '            site revid  :', b.site_revid)
    return len(master_branches)
Ejemplo n.º 4
0
def main(args):
    handle_arguments(args)
    set_up_logging(OPTIONS)

    branchname = OPTIONS.branch

    print('Retrieving master branch information from', MASTER_SERVER)
    master_branches = get_branch_info(MASTER_SERVER, OPTIONS.branch)

    print('Retrieving site branch information from', OPTIONS.site)
    site_branches = get_branch_info(OPTIONS.site, OPTIONS.branch)

    print('Processing')
    for branch in site_branches:
        b = find_branch(master_branches, branch)
        if not b:
            print('ERROR: branch missing from master:', branch.branch,
                  branch.component, branch.aspect, branch.revid)
        else:
            if b.revid == branch.revid:
                master_branches.remove(b)
            else:
                b.site_revid = branch.revid

    print('\nSite Information for',
          OPTIONS.branch if OPTIONS.branch else 'all branches')
    print('    %d items out of date' % len(master_branches))
    for b in master_branches:
        print('        ', b.branch, b.component, b.aspect)
        print('            master revid:', b.revid)
        print('            site revid  :', b.site_revid)
    return len(master_branches)
Ejemplo n.º 5
0
def main(args):
    ''' This main is for running tests and debugging only. Normally
    this module is imported.
    '''
    handle_arguments(args)
    set_up_logging(OPTIONS)

    if OPTIONS.branch:
        if OPTIONS.component:
            return branch_component(vcs.get_working_repository(),
                                    OPTIONS.component, OPTIONS.b, OPTIONS.to)
        else:
            branch, component = OPTIONS.to.split('/')
            return branch_sandbox(vcs.get_working_repository(), component,
                                  OPTIONS.b, branch)

    sb = sandbox.Sandbox(OPTIONS.sandbox_root)
    if OPTIONS.revno:
        if OPTIONS.component:
            show_component_revno(OPTIONS.component, sb, OPTIONS.tree)
        else:
            show_sandbox_revno(sb, OPTIONS.tree)
    if OPTIONS.tags:
        if OPTIONS.component:
            show_component_tags(OPTIONS.component, sb)
        else:
            show_sandbox_tags(sb)
    if OPTIONS.info:
        if OPTIONS.component:
            show_component_info(OPTIONS.component, sb)
        else:
            show_sandbox_info(sb)
    if OPTIONS.status:
        if OPTIONS.component:
            show_component_status(OPTIONS.component, sb)
        else:
            show_sandbox_status(sb)
    if OPTIONS.tag_info:
        show_sandbox_tag_info(OPTIONS.t, sb)
    if OPTIONS.update:
        if OPTIONS.component:
            update_component(OPTIONS.component, sb)
        else:
            update_sandbox(sb)
    if OPTIONS.tag:
        if OPTIONS.component:
            tag_component(OPTIONS.component, sb)
        else:
            tag_sandbox(sb)
    if OPTIONS.pull:
        if OPTIONS.component:
            pull_component(OPTIONS.component, sb)
        else:
            pull_sandbox(sb, OPTIONS.source)
    if OPTIONS.push:
        if OPTIONS.component:
            push_component(OPTIONS.component, sb)
        else:
            push_sandbox(sb, OPTIONS.source)
Ejemplo n.º 6
0
def main(args):
    ''' This main is for running tests and debugging only. Normally
    this module is imported.
    '''
    handle_arguments(args)
    set_up_logging(OPTIONS)

    if OPTIONS.branch:
        if OPTIONS.component:
            return branch_component(vcs.get_working_repository(), OPTIONS.component, OPTIONS.b, OPTIONS.to)
        else:
            branch, component = OPTIONS.to.split('/')
            return branch_sandbox(vcs.get_working_repository(), component, OPTIONS.b, branch)

    sb = sandbox.Sandbox(OPTIONS.sandbox_root)
    if OPTIONS.revno:
        if OPTIONS.component:
            show_component_revno(OPTIONS.component, sb, OPTIONS.tree)
        else:
            show_sandbox_revno(sb, OPTIONS.tree)
    if OPTIONS.tags:
        if OPTIONS.component:
            show_component_tags(OPTIONS.component, sb)
        else:
            show_sandbox_tags(sb)
    if OPTIONS.info:
        if OPTIONS.component:
            show_component_info(OPTIONS.component, sb)
        else:
            show_sandbox_info(sb)
    if OPTIONS.status:
        if OPTIONS.component:
            show_component_status(OPTIONS.component, sb)
        else:
            show_sandbox_status(sb)
    if OPTIONS.tag_info:
        show_sandbox_tag_info(OPTIONS.t, sb)
    if OPTIONS.update:
        if OPTIONS.component:
            update_component(OPTIONS.component, sb)
        else:
            update_sandbox(sb)
    if OPTIONS.tag:
        if OPTIONS.component:
            tag_component(OPTIONS.component, sb)
        else:
            tag_sandbox(sb)
    if OPTIONS.pull:
        if OPTIONS.component:
            pull_component(OPTIONS.component, sb)
        else:
            pull_sandbox(sb, OPTIONS.source)
    if OPTIONS.push:
        if OPTIONS.component:
            push_component(OPTIONS.component, sb)
        else:
            push_sandbox(sb, OPTIONS.source)