How to IMPORT or ADD and COMMIT UNVERSIONED COPY to Subversion using SVNAnt in Hudson?

2k views Asked by At

We are running Hudson ver. 1.395 as CI server and StarTeam as Repository. We are planning to move to Subversion as Repository(Hudson Server Plugin 2.3.3 installed). There is no issue in checking out from SVN server using SVNAnt (ver 1.3.1)script in Hudson, however we can’t IMPORT or ADD and COMMIT UNVERSIONED COPY to SVN.

<project name="***">        
    …   
    <path id="svn.classpath">
        <!--pathelement location="${svn.lib}/svnant.jar"/-->
        <fileset dir="${svn.lib}">
            <include name="svnant.jar"/>
            <include name="ganymed.jar"/>
            <include name="jna.jar"/>
            <include name="svnClientAdapter.jar"/>
            <include name="svnjavahl.jar"/>
            <include name="svnkit.jar"/>
        </fileset>
    </path> 

    <!-- Load the SVN Task -->
    <typedef resource="org/tigris/subversion/svnant/svnantlib.xml" classpathref="svn.classpath" />

    <!-- SVN Checkout -->
    <target name="svn-checkout">
        <svn username="${svn-user}" password="${svn-password}" svnkit="true" javahl="false">
            <checkout url="${svn-url}" revision="HEAD" destPath="${env.WORKSPACE}" />
            <info target="${env.WORKSPACE}"/>
        </svn>
    </target>

    <!-- SVN Add & Commit -->   
    <target name="svn-add">
        <svn username="${svn-user}" password="${svn-password}" svnkit="true" javahl="false">
            <add dir="${env.WORKSPACE}" force="true"/>
            <info target="${env.WORKSPACE}"/>
        </svn>
    </target>

    <target name="svn-commit">  
        <svn username="${svn-user}" password="${svn-password}" svnkit="true" javahl="false">
            <commit dir="${env.WORKSPACE}" message="${svn.message}"/>
            <info target="${env.WORKSPACE}"/>
        </svn>
    </target>

![Commit-Output][1] However we can do all the task of checkout, add, commit, import unversioned or underversioned copy using TortoiseSVN(1.7.11) or command line and ant script using CollabNer Subverison Client(1.7.8). I appreciate your time. Thank you.

1

There are 1 answers

2
FoxyBOA On
    <svn verbose="true" refid="svn.settings">
        <add dir="${svn_folder}" force="true" recurse="true" />
        <commit dir="${svn_folder}" message="${version}"/>
    </svn>