首页 > 代码库 > 批处理完成SVN更新与VS编译的操作

批处理完成SVN更新与VS编译的操作

/command:update

/command:add

/command:commit

/logmsg:"msgstr"

 

  1. 多个离散svn目录的更新
    1. "C:/program       files/tortoisesvn/bin/TortoiseProc.exe" /command:update       /Path:"C:/a/b/"*"D:/a/b/c/test/txt" /closeonend:0
      1.   
      2. /command:update      svn更新命令
      3.   
      4. /Path:"C:/a/b/c/"    需要更新的目录
      5.   
      6. /closeonend:0                    操作结束符
  2. 多个离散svn目录的提交
    1. "C:/program       files/tortoisesvn/bin/TortoiseProc.exe" /command:add       /Path:"C:/a/b/c/" /closeonend:0
    2. "C:/program       files/tortoisesvn/bin/TortoiseProc.exe" /command:commit       /Path:"C:/a/b/c/" /logmsg:"This is a Test"       /closeonend:0
      1.   
      2. /command:add                 
      3.   
      4. /command:commit
      5.   
      6. /logmsg:"msgstr"
  3. 隐藏CMD窗口[此功能不属于svn命令功能范畴,批处理解决方案]

@echo off

If "%1"=="h" goto begin

Start mshta vbscript:createobject("wscript.shell").run("""%~nx0""" h",0)(windows.close)&&exit:begin

 

@echo off

echo =================================

echo author lewis

echo email:lewisli_num@hotmail.com

echo update:2014-07-11

echo =================================

echo 这是一个简化svn更新与vs编译的批处理

echo 1)step one 更新专案svn目录

 

rem SVN安装目录

set svn_localpath=C:\Program Files\TortoiseSVN\bin

 

rem SVN操作目录

set svn_workpath=C:\UIAuto7.3x

 

echo 正在更新目录 %svn_workpath%

 

if exist %svn_workpath% GOTO :update

:update

"%svn_localpath%"\TortoiseProc.exe/command:update /path:"%svn_workpath%" /closeonend:0

 

echo 更新目录 %svn_workpath% 成功

pause

 

 

echo 2)step two 根据msbuild工具重新编译

set vs_BuildProjectPath=C:\UIAuto7.3x\DemoProject\AUTOTester.sln

echo 正在处理Project %vs_BuildProjectPath%

 

c:

rem VS BuildTool 路径

cd \Windows\Microsoft.NET\Framework\v4.0.30319

 

rem VS BuildProject

msbuild C:\UIAuto7.3x\DemoProject\AUTOTester.sln

 

echo 请检查编译是否成功,按任意键退出!

pause