[PATCH 1 of 2 stable] WHAT: PyExc_TypeError in parsers.c is lost - use PyExc_ValueError instead
pierre-yves.david at ens-lyon.org
Wed Oct 22 20:30:17 CDT 2014
On 10/19/2014 07:56 PM, Mads Kiilerich wrote:
> # HG changeset patch
> # User Mads Kiilerich <madski at unity3d.com>
> # Date 1413773777 -7200
> # Mon Oct 20 04:56:17 2014 +0200
> # Branch stable
> # Node ID 2ee3d9d0bc7be9b67f5f5f05db6faa2a9d927e2a
> # Parent c1ae0b2c1719f56b906472efea8b20ca0774c968
> WHAT: PyExc_TypeError in parsers.c is lost - use PyExc_ValueError instead
> This gives a reasonable and helpful error on Python 2.4:
> + File "$HGTMP/install/lib/python/mercurial/changelog.py", line 175, in headrevs
> + return self.index.headrevs(self.filteredrevs)
> + ValueError: unable to check filter
> + 
> With TypeError the exception is lost and the code will continue but misbehave.
> In the tests it shows as test-glog.t failing in weird ways. Python 2.7.8 also
> seems to ignore TypeError here.
> This doesn't make sense and we should figure out what really is going on, but
> it helps pointing out why test-glog.t is failing on Python 2.4.
> No other tests are failing even though index.headrevs terminates with an error
> that is ignored. That suggests that we have insufficient test coverage of the
> headrevs code.
I believe that the changelog is catxching the TypeError:
We should fix that code to explicitly check for the C version attribute
and stick on type error.
More information about the Mercurial-devel