I use similar code as follows. This is simply for checkout. We use the
Eclipse application to check in but I am sure CVS check in funcitons could
be used in a similar manner.


Your exact code will of course depend on repository names, project name(s),
location of repositiory, any passwords needed, if you want tagged versions
of projects or the latest from head etc. Hopefully this will get you going.


DT













!--
==================================================================== -->
<!-- BUILD PROPERTIES
-->
<!--
==================================================================== -->
      <target name="init">

            <!--
============================================================ -->
            <!-- PROJECT TAGS and SCRIPT VERSIONS
-->
            <!--
============================================================ -->

            <property name="Tag.Name" value="TagValue"/>



            <!--
============================================================ -->
            <!-- REPOSITORY LOCATIONS
-->
            <!--
============================================================ -->

            <property name="RepositoryName"
value=":pserver:servername:c:/cvs/repository/RepositoryName"/>




            <!--
============================================================ -->
            <!-- DIRECTORY STRUCTURE FOR BUILD
-->
            <!--
============================================================ -->


            <property name="build.source.dir" value="C:\source"/>

            <antcall target="preparedirs"/>
      </target>



<!--
==================================================================== -->
<!-- CREATE THE BUILD DIRECTORIES
-->
<!--
==================================================================== -->

      <target name="preparedirs">

            <mkdir dir="${build.source.dir}"/>
            <antcall target="versionedcheckout"/>

      </target>


<!--
==================================================================== -->
<!-- CHECKOUT TAGGED PROJECTS into build.source.dir
-->
<!-- ===================================================================
-->


      <target name="versionedcheckout">

            <cvs cvsroot="${RepositoryName}" command="checkout"
package="PackageName" tag="${TagValue}" dest="${build.source.dir}"/>

      </target>




<!--   OR     -->

<!--
==================================================================== -->
<!-- CHECKOUT LATEST FROM HEAD PROJECTS into build.source.dir
-->
<!-- ===================================================================
-->



      <cvs cvsroot="${RepositoryName}" package="PackageName"
dest="${build.source.dir}"/>

      </target>


                                                                                
                                                             
                      [EMAIL PROTECTED]                                         
                                                             
                      e.net                    To:       [email protected]    
                                                             
                                               cc:                              
                                                             
                      08/07/2006 07:34         bcc:                             
                                                             
                      AM                       Subject:  Need Info - Ant Script 
to Check In Code to CVS                                      
                      Please respond to                                         
                                                             
                      "Ant Users List"                                          
                                                             
                                                                                
                                                             
                                                                                
                                                             




Hi,
   I am looking for syntax for writing ANT script to do check in and check
out of code to/fro CVS. Request the group to help me asap. Thanks in
advance.
Regards,
Kaleem.






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to