前提在已配置好SVN路径的情况下,脚本目的是代替重复的鼠标Update工作
桌面创建SvnCommitUpdate.bat文件,超文本编辑内容:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | @echo off chcp 65001 echo. ==========按回车开始更新========== pause cls color 0a set SOURCE=%~dp0 Set SVN=E:\Software\TortoiseSVN\bin set svn_LocalPath1=F:\Note set svn_LocalPath2=F:\JJFAB set svn_LocalPath3=F:\IdeaProjects set svn_LocalPath4=E:\Develop\Maven\local_repository "%SVN%\TortoiseProc.exe" /command:update /path:"%svn_LocalPath1%"/closeonend:2 "%SVN%\TortoiseProc.exe" /command:update /path:"%svn_LocalPath2%"/closeonend:2 "%SVN%\TortoiseProc.exe" /command:update /path:"%svn_LocalPath3%"/closeonend:2 "%SVN%\TortoiseProc.exe" /command:update /path:"%svn_LocalPath4%"/closeonend:2 echo. ==============更新完成============== "%SVN%\TortoiseProc.exe" /command:commit /path:"%svn_LocalPath1%"/closeonend:2 "%SVN%\TortoiseProc.exe" /command:commit /path:"%svn_LocalPath2%"/closeonend:2 "%SVN%\TortoiseProc.exe" /command:commit /path:"%svn_LocalPath3%"/closeonend:2 "%SVN%\TortoiseProc.exe" /command:commit /path:"%svn_LocalPath4%"/closeonend:2 echo. ==============提交完成============== set SOURCE = set SVN = echo. ==========更新完成按回车结束========== pause |
可调整参数:
1 2 3 4 5 | /closeonend:0 不自动关闭对话框 /closeonend:1 如果没发生错误则自动关闭对话框 /closeonend:2 如果没发生错误和冲突则自动关闭对话框 /closeonend:3 如果没有错误、冲突和合并,会自动关闭 /closeonend:4 如果没有错误、冲突和合并,会自动关闭 |