> +def mayberevnum(repo, prefix): > + """Checks if the given prefix may be mistaken for a revision number""" > + try: > + i = int(prefix) > + # if we are a pure int, then starting with zero will not be > + # confused as a rev; or, obviously, if the int is larger > + # than the value of the tip rev > + if prefix[0:1] == b'0' or i > len(repo.changelog):
`len(repo)` should be better since `repo.changelog` over repoview isn't instant. Another option is to pass in an unfiltered repo as before. _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel