Optimization: limit the revision numbers scanned if revision prefix is
specified