def post_branch_init_hook(params): update_branch_info(params.branch.base, "0")
def post_change_branch_hook(changebranchparams): update_branch_info(changebranchparams.branch.base, changebranchparams.new_revno)
def update_branch_info(base, new_revno): branchpath = get_branchpath_from_base(base) if branchpath: update_branch_info(branchpath, new_revno)