def cmd_branch(name, is_deleted=False): b = Branch() if not name: for branch in b.get_all_branches(): print '* %s' % colored(branch, 'green') if branch == b.head_name else ' %s' % branch elif is_deleted: b.delete_branch(name) else : b.add_branch(name)
def cmd_branch(name, is_deleted=False): b = Branch() if not name: for branch in b.get_all_branches(): print '* %s' % colored( branch, 'green') if branch == b.head_name else ' %s' % branch elif is_deleted: b.delete_branch(name) else: b.add_branch(name)