Ejemplo n.º 1
0
def git_delete_removed():
    remote_branches, local_branches = git.get_remote_and_local_branches()
    branches = set([i[0] for i in dbcon.execute("""select branch from branch;""").fetchall()])
    diff = branches.difference(set(remote_branches))
    if TRACE:
        print "DELETE BRANCHES: ", diff
    dbcon.executemany("""delete from branch where branch=?;""", map(lambda x: (x,), diff))
Ejemplo n.º 2
0
def git_merge_updated(limit=20):
    remote_branches, local_branches = git.get_remote_and_local_branches()
    q = dbcon.execute(
        """select branch from branch where
        ((not git_master_head_remote is git_master_head_local_done)
        or (not git_remote_head_remote is git_remote_head_local_done))
        and jira_task_status='Need testing'
        limit %s;"""
        % (limit)
    ).fetchall()
    for (branch,) in q:
        _git_merge(branch, local_branches)