ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Massol" <vmas...@octo.com>
Subject [ChangeLogTask] Bugs ...
Date Sun, 31 Mar 2002 12:45:47 GMT
Ok, after a few hours of struggling, I think there are some bugs in the
changelogtask.

 

Actually, when I wrote the Cactus changelog task, I took the one from
Alexandria but I spent some time to correct some bugs as I discovered
them (can't remember exactly how many but there were a few) ...

 

Here is one bug :

 

When I execute a 'cvs log build.xml' I get :

 

RCS file: /home/cvs/jakarta-cactus/documentation/build.xml,v

Working file: build.xml

head: 1.1

branch:

locks: strict

access list:

symbolic names:

keyword substitution: kv

total revisions: 1;     selected revisions: 1

description:

----------------------------

revision 1.1

date: 2002/03/10 14:10:25;  author: vmassol;  state: Exp;

second part of build process refactoring

========================================================================
=====

 

Which is fine and understood by the ChangeLogTask.

 

However, if I execute a 'cvs log "-d >=2002-03-20" build.xml' I get :

 

RCS file: /home/cvs/jakarta-cactus/documentation/build.xml,v

Working file: build.xml

head: 1.1

branch:

locks: strict

access list:

symbolic names:

keyword substitution: kv

total revisions: 1;     selected revisions: 0

description:

========================================================================
=====

 

for which ChangeLogParser.java fails .

 

This is the reason why I added the following to the Cactus changelog
task :

 

                case GET_REVISION:

                    if (line.startsWith("revision")) {

                        revision = line.substring(9);

                        status = GET_DATE;

                        debug("Next state = GET_DATE");

                    }

 

                    // If we encounter a "=====" line, it means there is
no

                    // more entries for the current file.

                    else if (line.startsWith("======")) {

                        status = GET_FILE;

                        debug("Next state = GET_FILE");

                    }

                    break;

 

I also had to add the following few lines after having finished reading
the input stream (for some reason, it was hanging otherwise) :

 

            // Read the error stream so that it does not block !

            // We cannot use a BufferedReader as the ready() method is
bugged!

            // (see Bug 4329985, which is supposed to be fixed in JDK
1.4 :

            //
http://developer.java.sun.com/developer/bugParade/bugs/4329985.html)

            while (this.errorInput.ready()) {

                this.errorInput.read();

            }

 

Where errorInput is defined in :

 

    public void setProcessErrorStream(InputStream theIs) throws
IOException

    {

        this.errorInput = new InputStreamReader(theIs);

    }

 

Hope it helps.

Thanks

-Vincent


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message