显示SVN版本号



我想使用coldfusion获得最新的svn版本号。知道怎么做吗?

您仍然需要解析结果,如下所示:(可能取决于你的SVN应用程序,以及是在Windows还是Linux上)

<cfexecute name="c:Program FilesSlikSvnbinsvn.exe" timeout="30"
            arguments="--username myusername --password mypassword info ""c:inetpubmysite"""
            variable="res"></cfexecute>
<cfset a = listToArray(res,chr(10))>

<cfset rev=0>
<cfloop array="#a#" index="i">
    <cfset info = listToArray(i,":")>
    <cfif info[1] eq "Last Changed Rev">
            <cfset rev=trim(info[2])>
    </cfif>
</cfloop>
<cfoutput>#rev#</cfoutput>
<cfset workcopyPath = "[path to svn working copy]">
<cfset svnPath = "[path to svn executable]">
<cfset svnArg = " info #workcopyPath#">
<cfexecute name="#svnPath#"
           arguments="#svnArg#"
           timeout="10"
           variable="svnInfoResult">
<cfdump var=#svnInfoResult#>
http://www.coldfusionjedi.com/index.cfm/2006/12/9/ColdFsion-handling-of-Subversion-events

http://www.numtopia.com/terry/blog/archives/2008/02/using_coldfusion_and_svn_to_create_release_notes.cfm

最新更新