Ejemplo n.º 1
0
def setup_branches(args):
    conf = fetch_config(args)

    g = GitRepo(conf.paths.projectroot)

    if 'upstream' in g.remotes():
        remote = 'upstream'
    else:
        remote = 'origin'

    for pbranch in conf.git.branches.published:
        if g.branch_exists(pbranch):
            continue
        else:
            tracking_branch = '/'.join([remote, pbranch])
            g.create_branch(pbranch, tracking=tracking_branch)
            logger.info('created branch "{0}" tracking "{1}"'.format(pbranch, tracking_branch))
Ejemplo n.º 2
0
def setup_branches(args):
    conf = fetch_config(args)

    g = GitRepo(conf.paths.projectroot)

    if 'upstream' in g.remotes():
        remote = 'upstream'
    else:
        remote = 'origin'

    for pbranch in conf.git.branches.published:
        if g.branch_exists(pbranch):
            continue
        else:
            tracking_branch = '/'.join([remote, pbranch])
            g.create_branch(pbranch, tracking=tracking_branch)
            logger.info('created branch "{0}" tracking "{1}"'.format(
                pbranch, tracking_branch))