diff mercurial/fancyopts.py @ 22604:5e0d1478db8e

parsers: fix Py2.4 argument parsing issue Since fa53d66b45a8, we were getting this strange message with Py2.4: TypeError: argument 1 must be impossible<bad format char>, not int ..because we were using the 'n' type specifier introduced in 2.5. It turns out that offset is actually a revision number index, which ought to be an int anyway. So we store it in an int, use the 'i' specifier, rely on Py_ParseTuple for range checking, and rename it to avoid type confusion.
author Matt Mackall <mpm@selenic.com>
date Wed, 01 Oct 2014 14:44:24 -0500
parents 753af9ee7c81
children 69e8384a436c
line wrap: on
line diff