Re: Return value of an executed cvs command from a jsp page
Milos Kleint <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.modules.javacvs.devel |
|---|---|
| Message-ID | <[email protected]> |
Hildenbrand, Alexander wrote: > Hello > > I have a question concering the return values of a sent cvs command. > I use a web gui (jsp-pages) to get information of files that are checked in. > > > How can I fetch messages that are sent from the server after executing a cvs > command from a webgui? > I need the messages e.g. if a command fails for some reason. > Is there any documentation about that topic? > > Thanx > Alexander Hildenbrand > > > Hello. you can attach the CVSListener to teh command that will send you all the messages. These messages are separated in 2 groups: one are considered informational and are sent to stdout by command-line cvs. some are sent to stderr and could be considered "errors". However they are partly also informational. The global switches -Q and -q are meant to regulate what's sent (-q results in ommiting the stdout output and sending just sterr output). The stderr/stdout indication is handled in the MessageEvent class. The error handling is quite a mess in cvs protocol and is generally targeted at command-line usage and assumes user will know what's going on. It's not well suited from machine/automatic processing. Each command ends with "ok" or "error" response.. even when generally useful, they have strange semantics for the diff command (error means there were differences found) sometime it can even happen that the server closes connection without *any* error message. The command line cvs prints out that the server closed connection and you should consult previous messages, "if any".. Does it help? Milos