ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Martin <patrick.mar...@sungard.com>
Subject RE: Parsing cvs -nq update output
Date Fri, 29 Aug 2003 09:51:48 GMT
Thanks!

Could the replacetokens be something like:
<replacetokens>
	<token begintoken="?" endtoken=" " token="" value=""/>
</replacetokens>

Should I also use the striplinebreaks?

>  -----Original Message-----
> From: 	"Antoine Levy-Lambert" <antoine@antbuild.com>@SUNGARD  
> Sent:	vendredi 29 août 2003 11:46
> To:	Ant Users List
> Subject:	Re: Parsing cvs -nq update output
> 
> With cvs and the output attribute, you can capture cvs -nq update into a
> file.
> 
> Then from this file, with a combination of linecontainsregexp and
> replacetokens in a filter chain, you can get a list of all the files which
> are listed with a ? at the beginning of the line for instance, let's say
> in
> a property, supposing that you are nesting your filterchain in the
> loadproperties task.
> 
> Then you could use this property to run <cvs>
> 
> <commandline>
> 
> <argument value="add"/>
> 
> <argument line="${new_files}"/>
> 
> </commandline>
> </cvs>
> There is just a danger that :
> - you are running on Windows and some files contain embedded spaces
> ("C:/Program Files/)
> - there are too many files ===> command line too long
> Cheers,
> Antoine
> ----- Original Message -----
> From: "Patrick Martin" <patrick.martin@sungard.com>
> To: "'Ant Users List'" <user@ant.apache.org>
> Sent: Friday, August 29, 2003 11:18 AM
> Subject: Parsing cvs -nq update output
> 
> 
> > Hi,
> >
> > I need to create an auto-commit script.
> > The idea is to automatically:
> > . Add new files
> > . Remove old files
> > . Commit
> >
> > Basically the process would be the following:
> > . Run "cvs -nq update" which would give an output like:
> > ? MyNewFile.java
> > U MyOldFile.java
> > M MyModifiedFile.java
> > . Run "cvs add" for each file which is preceded by a '?'. We might also
> want
> > to check for the binary property of the file (cvs add -kb in this case),
> but
> > that might come later...
> > . Run "cvs remove" for each file which is preceded by a 'U'
> > . Run cvs commit
> >
> > I don't really see how to parse the "cvs -nq update" output in order to
> get
> > the 'to remove' and 'to add' file lists. I thought about FilterChains,
> > without really finding what I need. Any idea?
> >
> > Thank you,
> >
> > Patrick
> >
> >
> >
> >
> > Confidentiality Notice: The information contained in this e-mail message
> is
> > intended only for the personal and confidential use of the recipient(s)
> > named above. If the reader of this message is not the intended recipient
> or
> > an agent responsible for delivering it to the intended recipient, you
> are
> > hereby notified that you have received this document in error and that
> any
> > review, dissemination, distribution, or copying of this message is
> strictly
> > prohibited. If you have received this communication in error, please
> notify
> > us immediately by e-mail, and delete the original message.
> >
> > Message confidentiel : Les informations contenues dans ce message sont
> > destinees a un usage personnel et confidentiel du destinataire indique
> > ci-dessus. Si le lecteur de ce message n'est pas le destinataire prevu,
> ou
> > n'est pas une personne en charge de le delivrer au destinataire voulu,
> vous
> > etes par la presente informe que vous avez recu ce document par erreur,
> et
> > que tout examen, transmission, distribution ou copie de ce message est
> > totalement interdit. Si vous avez recu cette communication par erreur,
> nous
> > vous remercions de bien vouloir nous avertir immediatement par e-mail et
> de
> > detruire le message d'origine.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> > For additional commands, e-mail: user-help@ant.apache.org
> >
> >
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 
> 
> 
> 
Confidentiality Notice: The information contained in this e-mail message is
intended only for the personal and confidential use of the recipient(s)
named above. If the reader of this message is not the intended recipient or
an agent responsible for delivering it to the intended recipient, you are
hereby notified that you have received this document in error and that any
review, dissemination, distribution, or copying of this message is strictly
prohibited. If you have received this communication in error, please notify
us immediately by e-mail, and delete the original message. 

Message confidentiel : Les informations contenues dans ce message sont
destinées à un usage personnel et confidentiel du destinataire indiqué
ci-dessus. Si le lecteur de ce message n'est pas le destinataire prévu, ou
n'est pas une personne en charge de le délivrer au destinataire voulu, vous
êtes par la présente informé que vous avez reçu ce document par erreur, et
que tout examen, transmission, distribution ou copie de ce message est
totalement interdit. Si vous avez reçu cette communication par erreur, nous
vous remercions de bien vouloir nous avertir immédiatement par e-mail et de
détruire le message d'origine.


Mime
View raw message