rules: fix omparison between revisions

When updating rules, we need to type the parsed revision as an int
to avoid a invalid comparison with the existing revision.