使用sourcesafe6.0,如何同步服务器和客户机上的文件?(100分)

  • 主题发起人 主题发起人 zhouhe
  • 开始时间 开始时间
Z

zhouhe

Unregistered / Unconfirmed
GUEST, unregistred user!
我在使用jsp开发站点,现在遇到一个问题因为是使用sourcesafe管理代码,所以现在需要
每次在客户端checkout,更新文件以后,checkin到服务器上,然后跑到服务器上get last vision,
然后到客户端查看运行结果,非常麻烦,我知道一定有好的方式实现同步,
需要各位大虾能否提供帮助.
(注:希望不要使用第三方工具,比如InterDev,Frontpage之类的,因为本人是使用notepad编程的)
 
在客户端上check out all(只能更新不被占用的文件)
在客户端上安装sourcesafe,然后用get last version
 
哥们,我基本上。。。没有看懂,
我是想让服务器的相应目录下的相应文件自动得到更新的版本。
 
楼主的语文功力需要加强了,我没看明白你想干吗?
我猜你是想要一个在服务器上自动get latest的script?
如果是的话,ant提供了一个。
下面是我的实例,你修改一下吧:
<?xml version="1.0"?>
<!-- Build file for XXX project -->
<project name="XXX" default="ear" basedir=".">
<!-- set global properties for this build -->
<property name="src.jsp" location="jsp"/>
<property name="src.java" location="java"/>
<property name="dist" location="dist"/>
<property name="deploy" location="deploy"/>
<property name="prop" location="deploy/test-server"/>
<property name="ear.dir" location="dist/ear"/>
<property name="war.dir" location="dist/ear/war"/>
<property name="ear.file" location="bgssear.ear"/>
<property name="war.file" location="dist/ear/bgsswar.war"/>
<property name="vssServerPath" value="//server_XXX_VSS/"/>
<property name="vssLogin" value="deployUser,deployPassword"/>
<target name="init">
<echo message="Let`s Go"/>
<delete dir="${src.jsp}" quiet="true"/>
<delete dir="${src.java}" quiet="true"/>
<delete dir="${dist}" quiet="true"/>
<delete dir="${deploy}" quiet="true"/>
<mkdir dir="${src.jsp}"/>
<mkdir dir="${src.java}"/>
<mkdir dir="${dist}"/>
<mkdir dir="${ear.dir}"/>
<mkdir dir="${ear.dir}/META-INF"/>
<mkdir dir="${war.dir}"/>
<mkdir dir="${deploy}"/>
<tstamp/>
<echo>
XXXX销售系统自动打包程序
by 曹晓钢
[${DSTAMP}, ${TSTAMP}]
</echo>
</target>
<target name="get" depends="init">
<echo>[${DSTAMP}, ${TSTAMP}] 获取最新JSP代码...</echo>
<vssget localPath="${src.jsp}"
recursive="true"
login="${vssLogin}"
vsspath="/XXXXX/SourceCode/web"
serverPath="${vssServerPath}"
quiet="false"
/>
<echo>[${DSTAMP}, ${TSTAMP}] 获取最新java代码...</echo>
<vssget localPath="${src.java}"
recursive="true"
login="${vssLogin}"
vsspath="/XXXXX/SourceCode/JavaCode"
serverPath="${vssServerPath}"
quiet="false"
/>
<echo>[${DSTAMP}, ${TSTAMP}] 获取最新发布描述符...</echo>
<vssget localPath="${deploy}"
recursive="true"
login="${vssLogin}"
vsspath="/XXXXX/deploy"
serverPath="${vssServerPath}"
quiet="false"
/>
</target>

<target name="compile" depends="get"
description="compile the source " >
<path id="classpath">
<fileset dir="${src.jsp}/web-inf/lib">
<include name="*.jar"/>
<include name="*.zip"/>
</fileset>
<fileset dir="${ant.home}/lib">
<include name="**/ant*.jar"/>
</fileset>
<fileset dir="${deploy}/jar4build">
<include name="*.jar"/>
</fileset>
</path>

<echo>[${DSTAMP}, ${TSTAMP}] 正在编译...</echo>
<javac srcdir="${src.java}"
destdir="${src.jsp}/web-inf/classes"
target="1.3"
encoding="cp1252"
classpathref="classpath"
/>
</target>
<target name="war" depends="compile"
description="assembly the war file" >
<copy todir="${src.jsp}/WEB-INF">
<fileset dir="${deploy}/ear/war/WEB-INF">
</fileset>
</copy>

<copy todir="${src.jsp}/WEB-INF/classes">
<fileset dir="${prop}">
<include name="*.properties"/>
</fileset>
</copy>

<echo>[${DSTAMP}, ${TSTAMP}] 正在生成war...</echo>
<war warfile="${war.file}"
webxml="${deploy}/ear/war/WEB-INF/web.xml">
<fileset dir="${src.jsp}">
<exclude name="WEB-INF/**"/>
</fileset>
<lib dir="${src.jsp}/WEB-INF/lib">
<include name="*.jar"/>
<include name="*.zip"/>
</lib>
<classes dir="${src.jsp}/WEB-INF/classes">
<include name="**"/>
</classes>
<webinf dir="${src.jsp}/WEB-INF">
<exclude name="web.xml"/>
<exclude name="classes/**"/>
<exclude name="lib/**"/>
</webinf>
</war>
</target>

<target name="ear" depends="war"
description="assembly the ear file" >
<copy todir="${ear.dir}/META-INF">
<fileset dir="${deploy}/ear/META-INF">
</fileset>
</copy>

<echo>[${DSTAMP}, ${TSTAMP}] 正在生成ear...</echo>
<ear destfile="${ear.file}" appxml="${ear.dir}/META-INF/application.xml">
<fileset dir="${ear.dir}" includes="**.war"/>
<metainf dir="${ear.dir}/META-INF">
<exclude name="application.xml"/>
</metainf>
</ear>

<delete dir="${src.jsp}" quiet="true"/>
<delete dir="${src.java}" quiet="true"/>
<delete dir="${deploy}" quiet="true"/>
<delete dir="${dist}" quiet="true"/>
<echo>[${DSTAMP}, ${TSTAMP}] 生成ear完成。</echo>
<echo>[${DSTAMP}, ${TSTAMP}] BeaconSystem.com, All Rights Reserved.</echo>
</target>
</project>
 
后退
顶部