Joined: 13/10/2006 03:12:45
you can display the content of a file which is stored in a CVS-repository by using the command (where -q removes comments not related to the actual content, where -p means pipe to stdout, and -r V0R2M1 obviously means the release for which you want to see the file ABGA/dev/java/build/build.xml.
In my case (using CVSNT 2.5.03) this works fine when working from the command line.
When I invoke this command through the jCVS API, some strange thing happens. If the last line in the concerned (text-)file is NOT an empty line, the readAndParseResponse method infinitely waits at the line in the method .
The readLine() method contains a condition . If the file you want to display does not end with an empty line, the last line of the data which is redirected to stdout (stdout from the CVS-client's point of view) does not start with "ok" and hence the end of the stdout is not detected and the code infinitely waits for more input (which does not come).
One could modify the code in such a way that it scans for a line ending with "ok" to break the loop. However, I am a lousy programmer and do not fully understand the internals of jCVS.
Do you, fellow-readers of this forum, consider this as a bug? Can anyone reproduce the problem? Is this a problem?