def mayberevnum(repo, prefix):
    """Checks if the given prefix may be mistaken for a revision number"""
    try:
        i = int(prefix)
        if prefix != b'0' and prefix[0:1] == b'0' or i >= len(repo):
            return False
        return True
    except ValueError:
        return False
