Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#68 Ignore 'cvs server: Logging xxx' in log files

open
nobody
None
5
2007-01-19
2007-01-19
Anonymous
No

ANT SCRIPT

<project name="statcvs" default="statcvs" basedir=".">
<property environment="env" />
<property file="statcvs.properties" />

<taskdef name="statcvs" classname="net.sf.statcvs.ant.StatCvsTask"/>

<target name="statcvs" depends="" description="">
<exec executable="C:\Program Files\cvsnt\cvs" dir="<module dir>" output="C:\temp\log.txt">
<arg line="log -d &quot;2007-01-01&lt;&quot;" />
</exec>

<statcvs path="<module dir>" log="C:\temp\log.txt" outputDir="C:\temp\statcvs.txt" include="**/*.java" />
</target>
</project>

ANT OUTPUT

Total time: 2 minutes 18 seconds
S:\autobuild>ant -verbose -buildfile statcvs.xml
Apache Ant version 1.6.5 compiled on June 2 2005
Buildfile: statcvs.xml
Detected Java version: 1.5 in: C:\Program Files\Java\jdk1.5.0_06\jre
Detected OS: Windows XP
parsing buildfile S:\autobuild\statcvs.xml with URI = file:///S:/autobuild/statcvs.xml
Project base dir set to: S:\autobuild
[property] Loading Environment env.
[property] Loading S:\autobuild\statcvs.properties
Build sequence for target(s) `statcvs' is [statcvs]
Complete build sequence is [statcvs, ]

statcvs:
[exec] Current OS is Windows XP
[exec] Output redirected to C:\temp\log.txt
[exec] Executing 'C:\Program Files\cvsnt\cvs' with arguments:
[exec] 'log'
[exec] '-d'
[exec] '2007-01-01<'
[exec]
[exec] The ' characters around the executable and arguments are
[exec] not part of the command.

BUILD FAILED
S:\autobuild\statcvs.xml:12: Expected '?' or empty line at line 1, but found 'cvs server: Logging .'
at net.sf.statcvs.ant.StatCvsTask.execute(StatCvsTask.java:80)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.apache.tools.ant.Main.runBuild(Main.java:668)
at org.apache.tools.ant.Main.startAnt(Main.java:187)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)

Total time: 2 minutes 32 seconds
S:\autobuild>

LOG

cvs server: Logging .

RCS file: /cvs/<module>/Attic/.classpath,v
Working file: .classpath
head: 1.1
branch:
locks: strict
access list:
symbolic names:

...

Discussion

    • labels: 440291 -->
    • milestone: 441498 -->
    • summary: Expected '?' or empty line at l, but found 'cvs server: Logg --> Ignore 'cvs server: Logging xxx' in log files
     
  • Logged In: YES
    user_id=584620
    Originator: NO

    The Ant script writes STDERR into the logfile; this confuses the log file parser. I think adding a property logError="true" to the exec task should solve the problem.

    It wouldn't be hard to change the parser to ignore lines of the form "cvs log: Logging <something>" between files. That way, it would "just work" even with this kind of mis-generated logs.

    Moving this from bugs to RFEs.