Now that we have a handle on our type to represent revlog index
entries, let's use it.
This commit essentially consists of porting code from PyTuple to
PyObject.
As part of porting the code, we now retrieve elements in the entry
type by named attribute instead of integer index.
Before, PyTuple_* APIs allowed us to retrieve a borrowed reference
to PyObject elements. We can no longer do this via the PyObject_*
APIs for a type not implemented in C. This required extra refcount
manipulation in various places.
The C extension is now emitting the new type. And because various
code is still accessing index entry elements via getitem, we
see a performance regression in the Firefox repository:
$ hg perfrevset '::tip'
! wall 0.755869 comb 0.750000 user 0.750000 sys 0.000000 (best of 13)
! wall 1.011107 comb 1.010000 user 1.010000 sys 0.000000 (best of 10)
We will claw back this regression in subsequent commits by accessing
fields by name instead of index.
The version of the "parsers" C extension has been incremented to
reflect the change in behavior.
Perhaps AttributeError would be set by PyObject_GetAttrString().