[patch] syntax:plain for .hgignore

Guido Ostkamp hg at ostkamp.fastmail.fm
Tue Sep 11 16:27:58 CDT 2007

Hello Matt,

On Tue, 11 Sep 2007, Matt Mackall wrote:
> Something strikes me as odd here. I wrote a quick little test:
> $ time python2.5 retest.py re exit
> real    0m0.806s
> user    0m0.796s
> sys     0m0.008s

> On the other hand, if your regex is too large for your Python build and 
> it has to get broken into pieces, then regexes will probably lose.

the test above bombs out for me with this:

$ ./matt.py re exit
Traceback (most recent call last):
     File "./matt.py", line 20, in <module>
       m = rematch(pats)
     File "./matt.py", line 12, in rematch
       return re.compile(pat).match
     File "/usr/local/lib/python2.5/re.py", line 180, in compile
       return _compile(pattern, flags)
     File "/usr/local/lib/python2.5/re.py", line 231, in _compile
       p = sre_compile.compile(pattern, flags)
     File "/usr/local/lib/python2.5/sre_compile.py", line 530, in compile
       groupindex, indexgroup
OverflowError: regular expression code size limit exceeded

This is why I requested a Mercurial bugfix as the same has happened with 
our .hgignore before. You kindly provided one in changeset '0f6a1bdf89fb'. 
Since then it used to work for us.

I'm willing to try it with a tweaked Python 2.5.1 build, however I don't 
know what to change. The 'configure --help' of Python does not give any 

Do you have any hints for me what I need to change to have the regex 
module handle larger regular expressions?



More information about the Mercurial-devel mailing list