Re: Commitinfo behaviour
Laine Stump wrote: Do this instead: ^bbb script1 . ^aaa script2 . "^" makes sure that the "bbb" or "aaa" is at the beginning of the directory name. Note that the "/*" isn't doing what you think - it's matching "0 or more '/' characters". Remember, these are *real* regexes, not shell pathname wildcards... Even better, use ^bbb\(/\|$\) script1 . ^aaa\(/\|$\) script2 . The '\(/\|$\)' is the CVS regex incantation to match "'/' or the end of the line" and should guarantee you match a complete directory name and not a substring of another directory. I'll probably check a few examples into the manual soon. I think CVS uses the same regex mumbo jumbo sed uses if you want a man page. Derek -- Derek Price CVS Solutions Architect ( http://CVSHome.org ) mailto:[EMAIL PROTECTED] OpenAvenue ( http://OpenAvenue.com ) -- If [my] opinions are sound, they will occur to others, and will prevail by their own weight, without the aid of names. - Thomas Jefferson to Samuel Kercheval, 1816 ___ Info-cvs mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/info-cvs
Commitinfo behaviour
I know that commitinfo takes regular expressions to determine which script to run on each part of the repository. I've always (assumed I guess) thought that the regex started from CVSROOT. I've just observed behaviour which doesn't match this! Can anyone tell me how this is meant to work (is it a bug or expected behaviour). What I saw was: commitinfo: bbb/* script1 . aaa/* script2 . In the working directory was the structure aaa/ccc aaa/ddd/bbb aaa/eee During the commit script2 was run in aaa/ccc aaa/ddd and aaa/eee, but sript1 was run in aaa/ddd/bbb! *** Chris CameronOpen Telecommunications NZ Ltd Product Manager IN Product Management [EMAIL PROTECTED] P.O.Box 10-388 +64 4 495 8403 (DDI) The Terrace fax: +64 4 495 8419 Wellington cell: +64 21 650 680New Zealand Life, don't talk to me about life (Marvin - HHGTTG) ___ Info-cvs mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/info-cvs
RE: Commitinfo behaviour
You're missing part of the expression, "^". This should be: ^bbb/* script1 . You see it in all of the examples in the manual, so maybe you just overlooked it. The regular expression could just as easily match suffixes, like *.doc script_for_doc_files Jerry From: Chris Cameron [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 25, 2001 5:41 PM to run on each part of the repository. I've always (assumed I guess) thought that the regex started from CVSROOT. I've just commitinfo: bbb/* script1 . aaa/* script2 . ___ Info-cvs mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/info-cvs
Re: Commitinfo behaviour
Chris Cameron [EMAIL PROTECTED] writes: I know that commitinfo takes regular expressions to determine which script to run on each part of the repository. I've always (assumed I guess) thought that the regex started from CVSROOT. I've just observed behaviour which doesn't match this! Can anyone tell me how this is meant to work (is it a bug or expected behaviour). What I saw was: commitinfo: bbb/* script1 . aaa/* script2 . Do this instead: ^bbb script1 . ^aaa script2 . "^" makes sure that the "bbb" or "aaa" is at the beginning of the directory name. Note that the "/*" isn't doing what you think - it's matching "0 or more '/' characters". Remember, these are *real* regexes, not shell pathname wildcards... In the working directory was the structure aaa/ccc aaa/ddd/bbb aaa/eee During the commit script2 was run in aaa/ccc aaa/ddd and aaa/eee, but sript1 was run in aaa/ddd/bbb! *** Chris CameronOpen Telecommunications NZ Ltd Product Manager IN Product Management [EMAIL PROTECTED] P.O.Box 10-388 +64 4 495 8403 (DDI) The Terrace fax: +64 4 495 8419 Wellington cell: +64 21 650 680New Zealand Life, don't talk to me about life (Marvin - HHGTTG) ___ Info-cvs mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/info-cvs ___ Info-cvs mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/info-cvs
RE: Commitinfo behaviour
On Thu, 25 Jan 2001, Jerry Nairn wrote: You see it in all of the examples in the manual, so maybe you just overlooked it. The regular expression could just as easily match suffixes, like *.doc script_for_doc_files Suffixes on module (directory) names, yes. However, you (well, okay, I) couldn't get commitinfo to run on anything else except directory name patterns, as documented in the leading text of the commitinfo file. (The reason was I was trying to write some scripts to validate perl before it got into my repository; I ended up with a ALL handler that calls a script that uses file(1) on each file to figure out whether to run the check or not...) -- Jeremy Mates http://www.sial.org/ ___ Info-cvs mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/info-cvs