【批处理】SVN提交批处理命令

提交本地已丢失文件和目录

for /f "usebackq tokens=2*" %%i in (`svn st ^| findstr /R "^!"`) do svn del "%i"

提交新增或修改

svn add . --force

最终提交

svn commit -m "日志信息"

 传参提交命令案例

@echo off
SET SVNUpdate=%1
SET SVNPlatform=%2
SET PathTag=%3

echo %SVNUpdate%
if %SVNUpdate%==false (
exit(0)
)

cd %SVNPlatform%
:loop
for /f "tokens=1* delims=#" %%a in ("%PathTag%") do (
set curPath=%%a
set PathTag=%%b
)

echo %curPath%
cd %curPath%
echo %curPath%>%curPath%.txt
for /f "usebackq tokens=2*" %%i in (`svn st ^| findstr /R "^!"`) do svn del "%i"
svn add . --force
svn commit -m "更新"
cd ../
if defined PathTag goto :loop
pause

 

 是否更新  更新平台目录 多个子级目录

SVNUpdate.bat true Android Table#Effect

 

posted @ 2023-07-27 17:52  lovewaits  阅读(287)  评论(0编辑  收藏  举报