def METHOD_NAME(src_dir, *, remote, branch):
    checkout(src_dir, branch=branch)
    if process.run_subprocess_with_logging(f"git -C {io.escape_path(src_dir)} rebase {remote}/{branch}"):
        raise exceptions.SupplyError("Could not rebase on branch [%s]" % branch)