ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Quail <m...@cortexebusiness.com.au>
Subject Re: Does anyone have an example of CVS commit done with Ant?
Date Fri, 21 Mar 2003 03:21:58 GMT
> So, from your example, if I wanted to just check it
> buildnumber.txt, the command would be
> <cvs command="commit -m&quot; buildnumber.txt" failonerror="true"/>...?

not quite. you would have to remove the -m&quot; bit. This is the minimum you 
require:

<cvs command="commit buildnumber.txt" failonerror="true"/>

which is basically the same as doing this from the command line:

$ cvs commit buildnumber.txt

However, if you wanted to attach a cvs log message with that commit, you 
usually do this from the command line:

$ cvs commit -m "this is the commit message" buildnumber.txt

There are two ways to encode this in XML/Ant (both are satisfactory):

<cvs command='commit -m "this is the commit message" buildnumber.txt' 
failonerror="true"/>

<cvs command="commit -m &quot;this is the commit message&quot; buildnumber.txt"

failonerror="true"/>


(the difference between the two is the use of ' " and &quot;)

=Matt


> 
> -----Original Message-----
> From: Matt Quail [mailto:matt@cortexebusiness.com.au]
> Sent: Thursday, March 20, 2003 5:21 PM
> To: Ant Users List
> Subject: Re: Does anyone have an example of CVS commit done with Ant?
> 
> 
> Here is an example for a real build file for doing a cvs commit
> 
> <cvs command="commit -m&quot;auto build increment&quot; buildnumber.txt" 
> failonerror="true"/>
> 
> The workspace looks a little like this:
> 
> ./build.xml
> ./buildnumber.txt
> ./CVS/
> 
> That is, it is run from an already-checked-out workspace (hence the CVS 
> directory). That way, you don't need to specify the "package" attribute, the
> 
> command just runs "locally".
> 
> Does that make sense?
> 
> =Matt
> 
> Peter Adelmann wrote:
> 
>>Hi!
>>
>>Does anyone have an example of committing a file to CVS?  I need to build
> 
> a jar and then update CVS with the new jar file. It appears as though the
> task would go something like this:
> 
>><property name="cvs.root" value="\\serverName\Projects"/>
>>
>><target name="checkinJar" depends="buildingJarFile" description="commits
> 
> jar file">
> 
>>  <cvs cvsRoot="${cvs.root}" package="/new/jarFile.jar" command="commit"
> 
> />
> 
>></target>
>>
>>Any ideas/corrections would be greatly appreciated..Thanks again...Peter
>>
>> 
>>
>>
>>
>>---------------------------------
>>Do you Yahoo!?
>>Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
>>
>>
>>---------------------------------
>>Do you Yahoo!?
>>Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
> 
> 
> 
> 
> ---------------------------------------------------------------------
> 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
> 
> 
> 



Mime
View raw message