svn merge命令合包脚本(按日期)
rem 功能 :自动指定日期以后的所有版本merge到主干 rem 入参 :1服务名;2分支名;3注释内容;4日期 @echo off rem =========进入待merge的本地workspace========= if (%4 == "") echo 日期为空 cd D:workspace235%1 echo Goto local path...... rem =========更新本地workspace========= svn update echo Update local workspace... rem =========获取分支的更新履历,并写入本地文件========= svn log -q -r {%4}:HEAD --stop-on-copy https://kxbdatdbpc:8443/svn/WJ-SVN/03_Resource/%1/branches/%2 > D:svn_merge\%1.log echo Get the branch's history...... type D:svn_merge\%1.log rem =========模拟merge确定有没有冲突========= echo svn merge start...... svn merge https://kxbdatdbpc:8443/svn/WJ-SVN/03_Resource/%1/branches/%2 -r {%4}:HEAD D:workspace235%1 --dry-run rem =========如果有冲突文件按N退出,若没有按Y继续========= set /p Askme=continue(Y) or exit(N)? if /i "%Askme%"=="y" goto next if /i "%Askme%"=="n" goto end rem =========执行merge========= :next rem =========格式化当前时间========= set CURRENT_DATE_TIME=%date:~0,4%-%date:~5,2%-%date:~8,2%-%time:~0,2%:%time:~3,2%:%time:~6,2% echo svn merge https://kxbdatdbpc:8443/svn/WJ-SVN/03_Resource/%1/branches/%2 -r {%4}:HEAD D:workspace235%1 svn merge https://kxbdatdbpc:8443/svn/WJ-SVN/03_Resource/%1/branches/%2 -r {%4}:HEAD D:workspace235%1 rem =========写入merge日志文件========= echo %CURRENT_DATE_TIME%====/%1/branches/%2 -r {%4}:HEAD D:workspace235%1 >> D:svn_mergeSVN_Merge.log rem =========提交文件========= svn commit -m %3 echo %3 echo %CURRENT_DATE_TIME%====%3 >> D:svn_mergeSVN_Merge.log rem =========处理结束并返回脚本所在目录========= :end cd D:svn_merge
©️公众号:思考者文刀
- 上一篇: ibdata1文件过大的处理方法
- 下一篇: 用VBA制作的流量日报做成工具
评论
游客
回复写的太好啦,评论一个http://j8ke.zhujibus.com
游客
回复终于看完了,很不错!http://8u0.yonghengtang.cn
游客
回复太高深了,理解力不够用了!http://www.tjdkdz.com
游客
回复今天上网不回帖,回帖就回精华帖!http://www.gkpzn.com