def main(argv): #change working dir to separate test_proj test_dir = os.path.abspath("../../test_proj") os.chdir(test_dir) print config_wrapper.get_all_config() print config_wrapper.get_branch_config("test-branch")
def git_p4_config_write(branch_name, p4config): p4w = p4_wrapper() (p4port, p4user, p4client) = config_wrapper.get_branch_credentials(branch_name) p4w.p4_login(p4port, p4user, p4client) p4config_old = p4w.p4_client_read() config_wrapper.set_branch_config(branch_name, p4config) p4config_new = config_wrapper.get_branch_config(branch_name) p4w.p4_client_write(p4config_new) #TODO: add restoring previous config if write was not successfull p4w.logout()
def git_p4_config_list(branch_name): if branch_name == None: print config_wrapper.get_all_config() else: print config_wrapper.get_branch_config(branch_name)