Re: [ANNOUNCE] cvsps support for parsing BK->CVS kernel tree logs

From: David Mansfield (lkml@dm.cobite.com)
Date: Wed Mar 19 2003 - 17:21:12 EST


On Wed, 19 Mar 2003, Andrea Arcangeli wrote:

> I'm downloading the new version now... ;) thanks
>
> > The file is actualy a substring match. If the -f argument matches as a
>
> so it doesn't sound a regex. Being able to specify more than 1 -f would
> be very useful. Either that or regex would do it fine too with
> '^net/core', so as far as I can write stuff like -f
> '^net/core|^net/ipv4' I'm fine.
>
> I also think using match by default in the regex is cleaner. So I can
> write -f 'net/core|net/ipv4' w/o bothering about the ^ because it become
> implicit. And I can still use '.*net/core.*' if I want a substring
> regex. I think substring search will be not common.
>
> But really, any kind of way you implement the 'multiple file' thing is
> fine as far as I can specify more than 1 file ;).
>

Attached is a patch (on top of previous which is on top of 2.0b5) changes
the -f to regex match. The regex is of course slightly slower than
'strstr' but I agree the advantage is worth it.

It differs slightly in syntax (c library regex just works this way):

cvsps -f '^net/core\|^net/ipv4'
                   ^
                   You must escape the | symbol to separate the regex.

Try it out!

David

-- 
/==============================\
| David Mansfield              |
| lkml@dm.cobite.com           |
\==============================/


- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Mar 23 2003 - 22:00:28 EST