Hello, one way to do this is to use error and output attributes of <cvs> task (quote from [1]): output - the file to direct standard output from the (cvs) command. error - the file to direct standard error from the (cvs) command
So you can store the error in a text file, than load that file as a property and check whether it <condition>[2] whether contains a given error message. Here is the pseudo code: <cvs command="checkout" cvsRoot=":pserver:[EMAIL PROTECTED]:/home/cvspublic" package="my_module" dest="${checkout.dir}" error="${cvs.error.file}" /> <loadfile property="cvs.error.msg" srcfile="${cvs.error.file}"/> <condition property="cvs.error"> <contains string="${cvs.error.msg}" substring="<cvs_error_msg_that_might_be_returned>"> </condition> The problem in this approach is that you should find all possible cvs_error_msg_that_might_be_returned. Well, you can also do the following: if the error file is created, then obviously there is an error while checking the module out. Instead of trying to find the exact error, mail the whole error file :) Regards Ivan [1]http://ant.apache.org/manual/CoreTasks/cvs.html [2]http://ant.apache.org/manual/CoreTasks/conditions.html --- Rizwan Merchant <[EMAIL PROTECTED]> wrote: > > Hi, > I'm using ant to checkout code from the CVS. If the > checkout is not > successful I would like to send an email to someone > to notify them of the > problem. > > How do I detect this error in ant? Say the password > on the cvs account is > wrong, cvs notifies of bad login and then the ant > continues executing with a > "build successful" result (i.e. cvs exits normally). > > Any ideas? Pls help. > > Thanks, > -Rizwan. > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]