ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlcarpen...@household.com
Subject New cvsgroupimport and cvsmergebranches tasks. (Need input)
Date Mon, 05 Aug 2002 21:48:23 GMT

I am working on keeping two VAJ repositories in sync with each other via
CVS.  This has the added benefit of allowing development on the main
CVS branch to find its way into the VAJ repositories as well. (Sweet
freedom!)

To do this I have the following rough outline of an Ant build script.  You
will notice a few new ant tasks I intend to implement.  It is these tasks I
am asking guidance on, specifically the CVS related tasks.  The VAJ tasks
are pretty much based on what already exists and consequently fairly
straightforward.  (The VAJ tasks in the existing distribution are broken
and require a few fixes I have not yet submitted.  See my previous postings
and the bug report in bugzilla.)

In particular I am referring to the cvsgroupimport and cvsmergebranches
tasks.  There is also a need for some task or combination of tasks that
will isolate the changed files.  Any guidance concerning the task
interfaces or suggestions as to how to easily implement the tasks will be
appreciated.  I certainly intend to use the existing CVS tasks to help me,
but I haven't studied them close enough to know how to proceed.

Any guidance?

James Lee Carpenter
Software Engineer
Household Technical Services
6602 Convoy Court
San Diego, CA 92111

ph: 858-609-2461
email: jlcarpenter@household.com

<project name="My Project" default="all" basedir=".">

     <property file="build.properties"/>

     <!--
     Define the vajgroupexport task.
     -->
     <taskdef name="vajgroupexport" classname
="org.apache.tools.ant.taskdefs.optional.ide.VAJGroupExport"/>

     <!--
     Delete the directory containing exported VAJ project
     source code if it exists.
     -->
     <target name="clean">
          <delete dir="${vajproject.src}"/>
     </target>

     <!--
     Create a directory to export the VAJ project source code to.
     -->
     <target name="prepare">
          <mkdir  dir="${vajproject.src}"/>
     </target>

     <!--
     Run the custom vajgroupexport task which first loads a list of
projects
     into the Visual Age for Java workspace and then exports them.

     The vajgroupexport task already exists and seems to be working.
     (Actually the vajproject version can not yet be "current" rather
     than a specific version name, but that should be a simple improvement
     to the existing VAJ tool servlets.)
     -->
     <target name="vajdump" depends="clean,prepare">
          <vajgroupexport
               remote="localhost:32767"
               destdir="${vajproject.src}"
               exportSources="yes"
               exportResources="yes"
               exportClasses="no"
               exportDebugInfo="no"
               defaultexcludes="yes"
               overwrite="yes">
               <vajproject name="hackko" version="current"/>
               <vajproject name="ExampleRemoteTools" version="current"/>
          </vajgroupexport>
     </target>

     <!--
     Import everything in the directories indicated by the importgroups
into
     CVS with an autogenerated tag name.

     The guideFile will be created if it does not already exist.  This will
later
     be used to determine a list of historical tag names matching the
releaseTagPrefix.

     This task does not yet exist!
     -->
     <target name="cvsimport">
          <cvsgroupimport
               cvsRoot=":pserver:hackko@85.101.22.41:d:\cvsrepository"
               port="2401">
               <importgroup
                    guideFile="guidefile.txt"
                    vendorTag="VAJRepositoryA"
                    releaseTagPrefix="VAJRepositoryA_">
                    <fileset dir="${VAJRepositoryACode.dir}"/>
               <importgroup>
               <importgroup
                    guideFile="guidefile.txt"
                    vendorTag="VAJRepositoryB"
                    releaseTagPrefix="VAJRepositoryB_">
                    <fileset dir="${VAJRepositoryBCode.dir}"/>
               <importgroup>
          </cvsgroupimport>
     </target>

     <!--
     Merge recent changes from both repositories into the main branch.
     The cvsmergebranches task will need to be smart enough to sort the
existing
     tags by suffix and only use the last two tags on a branch for the
     cvs update command.  (i.e. >cvs update -j RepositoryA_2 -j
RepositoryA_3)
     If commitChanges is true the merged results will be commited to the
     CVS repository.

     The guideFile tells the task which CVS file can be inspected to
determine
     a list of historical tag names matching the releaseTagPrefix.

     This task does not yet exist!
     -->
     <target name="mergebranches">
          <cvsmergebranches
               workarea=${cvsworkarea.dir}
               cvsRoot=":pserver:hackko@85.101.22.41:d:\cvsrepository"
               port="2401"
               commitChanges="true">
               <cvsvendorgroup
                    releaseTagPrefix="VAJRepositoryA_"
                    guideFile="guidefile.txt"/>
               <cvsvendorgroup
                    releaseTagPrefix="VAJRepositoryB_"
                    guideFile="guidefile.txt"/>
          </cvsmergebranches>
     </target>

     <!--
     There will also need to be task to discover which files have changed
     in each branch and the main branch.  This result can then be used
     to update the VAJ repositories.
     -->
     <target name="findchangedfiles">
     </target>

     <!--
     Import a group of projects into VAJ
     Use only dir or importlist attribute, not both!

     This task does not yet exist and has not been thought out well!
     -->
     <target name="groupimport">
          <vajgroupimport
               importSources="no"
               importResources="yes"
               importClasses="no"
               remote="localhost:32767"
               dir="${allproject.dir}"
               importlist="${importlist.file}"/>
     </target>

     <!--
     Do everything!
     -->
     <target name="all" depends
="clean,prepare,vajdump,cvsimport,mergebranches,findchangedfiles,groupimport"/>

</project>



--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message