Beispiel #1
0
def branch_component(comp, directory, branch):
    if not branch:
        print('Please enter a name for the new branch using the -b option.')
        return
    err = component.get_branch_name_validation_error(branch)
    if err:
        print err
        return
    wr = vcs.get_working_repository()
    aggregate_vcs.branch_component(wr.master_reporoot, comp, branch, _find_sb(directory))
Beispiel #2
0
def branch_component(comp, directory, branch):
    if not branch:
        print('Please enter a name for the new branch using the -b option.')
        return
    err = component.get_branch_name_validation_error(branch)
    if err:
        print err
        return
    wr = vcs.get_working_repository()
    aggregate_vcs.branch_component(wr.master_reporoot, comp, branch,
                                   _find_sb(directory))
Beispiel #3
0
def branch_sandbox(to, source):
    if to is None:
        print('Please enter a name for the new branch using the --to option.')
        return
    if source is None:
        print('Please enter a name for the old branch/component using the --from option.')
        return
    if not '/' in source:
        print('From needs to be in format branch/component.')
        return
    err = component.get_branch_name_validation_error(to)
    if err is not None:
        print 'Branch %s' % err.lower()
        return
    wr = vcs.get_working_repository()
    wr.source_reporoot = wr.master_reporoot
    branch, comp = source.split('/')
    aggregate_vcs.branch_sandbox(wr, comp, branch, to)
Beispiel #4
0
def branch_sandbox(to, source):
    if to is None:
        print('Please enter a name for the new branch using the --to option.')
        return
    if source is None:
        print(
            'Please enter a name for the old branch/component using the --from option.'
        )
        return
    if not '/' in source:
        print('From needs to be in format branch/component.')
        return
    err = component.get_branch_name_validation_error(to)
    if err is not None:
        print 'Branch %s' % err.lower()
        return
    wr = vcs.get_working_repository()
    wr.source_reporoot = wr.master_reporoot
    branch, comp = source.split('/')
    aggregate_vcs.branch_sandbox(wr, comp, branch, to)