[PATCH] parsers: clarify documentation of test-parseindex2.py

Matt Mackall mpm at selenic.com
Tue Dec 3 05:45:06 UTC 2013


On Mon, 2013-12-02 at 21:06 -0800, Chris Jerdonek wrote:
> On Mon, Dec 2, 2013 at 1:43 PM, Chris Jerdonek <chris.jerdonek at gmail.com> wrote:
> > On Mon, Dec 2, 2013 at 11:52 AM, Sean Farley
> > <sean.michael.farley at gmail.com> wrote:
> >>
> >> bos at serpentine.com writes:
> >>
> >>> On Mon, Dec 2, 2013 at 8:12 AM, Chris Jerdonek <chris.jerdonek at gmail.com>wrote:
> >>>
> >>>> parsers: clarify documentation of test-parseindex2.py
> >>>>
> >>>
> >>> Applied, thanks.
> >>
> >> Just a heads up that Matt backed out your previous parsers patch in 96b2dd77c85d.
> >
> > Thanks, Bryan.  And thanks, Sean.  Yeah, I saw that.  This change was
> > partly in response to that.  The previous language read like the test
> > module only applies to the C version, while in fact the pure Python
> > version is also under test, which I didn't think to check.  (The new
> > test breaking in "pure" mode is I believe the reason he backed out the
> > change.)  I can fix that no problem.
> 
> Also by the way, can anyone clarify what Matt might have meant in his
> backout message when he said the change "introduced mandatory
> recompilations"?
> 
> http://selenic.com/hg/rev/96b2dd77c85d
> 
> Was that just an observation, or was it a reference to something
> general to avoid when making changes to the C code?

We like to avoid a strict coupling between versions of the C code and
the Python code because it makes things like bisect much more tedious by
adding compilation steps. It also makes it harder for people without
compilers to test out unreleased code.

The trick is for the Python code to detect whether the new API is
available but fall back quietly if not. I noticed it wasn't doing this
precisely because pure/ broke.

> If it means that tests should pass across changesets even if the C
> code is not recompiled, I would like clarification on that.  I can do
> that, but it seems something like that should be spelled out in the
> wiki because it adds additional requirements.

There are only a few brave souls who've ever touched the C code so it
hasn't been much of a problem in the past.

-- 
Mathematics is the supreme nostalgia of our time.





More information about the Mercurial-devel mailing list