Use the existing function is_branch_revision_number().