DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25645>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25645

[BUG][FIX] cvschangelog task - no trace/log in case of error

           Summary: [BUG][FIX] cvschangelog task - no trace/log in case of
                    error
           Product: Ant
           Version: 1.1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Core tasks
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


In case of wrong result from cvs, only 'Error running cvs log' is visible. The
fix is to move the displaying of 'error log' from cvs, just after launching the
cvs command. Below you will find the patch. Still one issue:
- cvs is too robust in command cvs log - it often produces proper/good output
but still returns as result 1 (bad) - often when there are some warnings. Maybe
it would be nice to have additional switch: 'ignoreresult'  (cvs result)

Index: ChangeLogTask.java
===================================================================
RCS file:
/home/cvspublic/ant/src/main/org/apache/tools/ant/taskdefs/cvslib/ChangeLogTask.java,v
retrieving revision 1.25
diff -u -r1.25 ChangeLogTask.java
--- ChangeLogTask.java  17 Sep 2003 20:11:43 -0000      1.25
+++ ChangeLogTask.java  19 Dec 2003 09:49:07 -0000
@@ -283,20 +283,20 @@
             exe.setWorkingDirectory(m_dir);
             exe.setCommandline(command.getCommandline());
             exe.setAntRun(getProject());
-            try {
+
+                                               try {
                 final int resultCode = exe.execute();
 
+                                                               final String 
errors = handler.getErrors();
+                                                       
+                                                               if (null != 
errors) {
+                                                                       
log(errors, Project.MSG_ERR);
+                                                               }
                 if (Execute.isFailure(resultCode)) {
                     throw new BuildException("Error running cvs log");
                 }
             } catch (final IOException ioe) {
                 throw new BuildException(ioe.toString());
-            }
-
-            final String errors = handler.getErrors();
-
-            if (null != errors) {
-                log(errors, Project.MSG_ERR);
             }
 
             final CVSEntry[] entrySet = parser.getEntrySetAsArray();

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to