简体   繁体   English

删除后提交Powershell SVN

[英]Powershell SVN Commit After Delete

I am writing a script to remove all files from a directory in SVN: 我正在编写脚本以从SVN中的目录中删除所有文件:

$svn = 'C:\Program Files\TortoiseSVN\bin\svn.exe'
$commitmsg = 'C:\TradeSupport\AB Reports\msg.txt'
$Reports = Get-Content -Path 'C:\TradeSupport\AB Reports\AB Reports.csv'
Foreach ($Report in $Reports){
    & $svn remove --force C:\SVN\Test\$Report
    & $svn commit -F $commitmsg C:\SVN\Test\$Report}
& $svn update $commitmsg 'C:\SVN\Test'

The files are TestA and TestB. 文件是TestA和TestB。 Running the script deletes the files but does not commit the change. 运行脚本会删除文件,但不会提交更改。 No error is thrown, but I have to go back and physically commit the change. 没有引发任何错误,但是我必须回过头来亲自提交更改。 What would be the best way to automate this process? 自动化此过程的最佳方法是什么?

I also had the commit point to the directory itself, while outside the ForEach loop, but that did not work either. 在ForEach循环之外,我还拥有了指向目录本身的提交点,但这也不起作用。

我必须将工作目录更改为C:\\ SVN \\ Test

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM