[patch] syntax:plain for .hgignore

Johannes Hofmann Johannes.Hofmann at gmx.de
Wed Sep 5 10:28:47 CDT 2007


On Wed, Sep 05, 2007 at 05:19:01PM +0200, Benoit Boissinot wrote:
> On 9/5/07, Johannes Hofmann <Johannes.Hofmann at gmx.de> wrote:
> > In a project at work we have a large repository with many generated
> > files that have no specific extension (mostly executables).
> > Therefore the .hgignore file is pretty large (more than 500 lines).
> > In this setup "syntax:plain" (see patch below) speeds up hg status
> > from 2.5s to about 1s.
> > I'm not really familiar with python so this can probabely done more
> > elegantly.
> >
> 
> Can't you reuse the path:/relpath: from the pattern (just map plain to path)

I'm not sure I understand this correctly. Do you mean not adding any
new syntax but rather check whether a string excactly matches any
pattern first before doing the real regexp matching?

The problem with this is that the regexpression does not get any
smaller. In most cases the files won't match so there won't be much
of a performance gain.

But again, perhaps I just did not understand your proposal correctly.
  
regards,
   Johannes

> 
> regards,
> 
> Benoit


More information about the Mercurial mailing list