I am trying to compare the contents of a text file locally on my PC, to a folder in the SVN directory.
Using SVN for the first time, so my code is not so good, I hope you can help me.
This is the returnfile.txt file; I want to compare this with a folder in SVN and check the difference:
t123455 t123456 t123457 t123458 t123459 t123450 t123451 t123452 t122222 t100001
This is an XML file, is this correct? Selecting from SVN and compare files using filesmatch?
<project name="Read_Script_Name_From_Svn" default="SVN_READ_files" basedir="." > <property file="SP.properties"/> <property environment="env"/> <target name="ReadSvn"> <property name="Svn_ScriptFileName" value="${arg2}"/> <property name="SvnFolder" Value="${arg3}"/> <property name="CurrentDir" Value="${arg4}"/> <property name="svn.path" Value="${arg5}"/> <path id="path.svnant"> <pathelement location="${ant-jar-dir}\SVN1.8.Client\svnant.jar" /> <pathelement location="${ant-jar-dir}\SVN1.8.Client\svnClientAdapter.jar" /> <pathelement location="${ant-jar-dir}\SVN1.8.Client\antlr-runtime-3.4.jar" /> </path> <typedef resource="org/tigris/subversion/svnant/svnantlib.xml" classpathref="svnant.classpath" /> <svnSetting svnkit="true" javahl="false" id="svn.settings" username="${svn.username}" password="${svn.password}" failonerror="false"/> <property name="build_path_new" value="${CurrentDir}/SvnCheckout"/> <svn refid="svn.settings.kwt" logFile="${SVN-LOG-FILE}"> <checkout url="${svn.path}/${SvnFolder}" destpath="${build_path_new}/${SvnFolder}" revision="HEAD" depth="empty" /> <update recurse="true" revision="HEAD" dir="${build_path_new}/${SvnFolder}"/> <filesmatch file1="${CurrentDir}/Returnfile.txt" file2="${build_path_new}/${SvnFolder}" textfile="true"/> <commit dir="${build_path_new}/${SvnFolder}" message="Deleting Script Filename ${Svn_ScriptFileName} before adding it"/> <update recurse="true" revision="HEAD" dir="${build_path_new}/${SvnFolder}"/> </svn> </target> </project>
My problem here in the batch file is how can I write it in such a way as to call the ANT file?
@echo off Set CurrentDir=%~dp0 cd /d %CurrentDir% set libDir=%libParentFolder%lib set CLASSPATH=%libDir%\ant.jar;%libDir%\ant-launcher.jar;%libDir%\ant-nodeps.jar set buildfile=test.xml java -Dsvnkit.http.methods=Basic,Digest,Negotiate,NTLM -cp ;%CLASSPATH% AntBuilds.StartUp %buildfile% ReadSvn >>MyLogFile.LOG
svn batch-file ant
Moudiz
source share