> Thanks for your code, I have tested we the example file I am sending to you,
> but it prints me the followin message: "No RCS-formatted logs were found!" I
> don't know why because I have such logs comments.

It's because your log comments are in this form:

---- begin snip ----
//Source file: I:\\isf\\util\\DynamicInstance.java

/* CmIdentification
////////////////////////////////////////////////////////////////////////////////
// Version History:
$Log: DynamicInstance.java,v $
Revision 1.5  2003/07/28 16:18:08  UF367151
Extension to the isf.util package, to be included on the kernel of SGCv10. Utility 
classes.


////////////////////////////////////////////////////////////////////////////////
 */
---- end snip ----

My script was written for cases where the $Log$ tag is NOT flush left, but rather has 
some sort of character prefix to the left of the tag.  This is a sufficiently standard 
condition that RCS was designed to detect and re-insert those prefixes before every 
revision comment line.  That is, my script was designed to work for cases like this:

/*
 * Author:   $Author$
 * Revision: $Revision$
 * History:
 *           $Log$
 *           Revision 1.5  2003/07/28 16:18:08  UF36715
 *           Extension to the isf.util package, to be included 
 *           on the kernel of SGCv10. Utility classes.
 */

or this:

// Author:   $Author$
// Revision: $Revision$
// History:
//           $Log$
//           Revision 1.5  2003/07/28 16:18:08  UF36715
//           Extension to the isf.util package, to be included 
//           on the kernel of SGCv10. Utility classes.

...or something along those lines.

See, there needs to be some way of telling when the $Log$ comments STOP.  Given the 
variety of coding conventions in use, it's impossible to come up with a standard, 
failsafe way to do that.

If you want to pursue this, and if the Java source you sent was representative of your 
entire body of code, then try changing the middle block of the script from this:

        elsif( $State eq "IN_LOG" )
        {
            if( $Line =~ /^$Prefix/ )
            {
                # looks like a follow-on log line;
                # do nothing, and thus delete line
            }
            else
            {
                # looks like the prefix has changed, so
                # assUme we've ended the log section
                print $Line;
                $State = "AFTER_LOG";
            }
        }

...to this:

        elsif( $State eq "IN_LOG" )
        {
            if( $Line =~ /^\/\/+/ )
            {
                # looks like we hit one of those //////////... 
                # separators, so assUme we've ended the log section
                print $Line;
                $State = "AFTER_LOG";
            }
        }

Beyond that, you need to find someone on your end who can help you with automated text 
processing (or order a used copy of this 
http://www.amazon.com/exec/obidos/asin/1565924622).  This has ceased to be a CVS 
discussion.


_______________________________________________
Info-cvs mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/info-cvs

Reply via email to