简体   繁体   中英

Powershell SVN Commit After Delete

I am writing a script to remove all files from a directory in 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. 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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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