Example #1
0
def branch_info(repo: RepositoryContractWrapper):
    branch_data = repo.get_branch(current_branch)
    editors = repo.get_branch_editors(current_branch)

    print(f"Branch ID: {current_branch}")
    print(f"Branch Name: {branch_data[1]}")
    print(f"Branch Owner: {branch_data[0]}")
    print(f"Branch Editors: {editors}")
Example #2
0
def list_branches(repo: RepositoryContractWrapper):
    count = repo.get_branch_count()

    for i in range(count):
        branch = repo.get_branch(i)
        print(f"{i} - {branch[1]} owned by {branch[0]}" )