まず、サーバーに接続せずにサーバーで更新が発生したかどうかを知る方法がないことを理解する必要があります。したがって、svnの仕組みではないため、ローカルフォルダーを見るだけではできません。
あなたが望むものを達成するための回避策は次のとおりです。サーバー上で、テキスト ファイルからカウンターを取得し、インクリメントして、書き戻す "post-commit" フックを記述します。このテキスト ファイルをクライアントがダウンロードできる場所に置きます。これが「http://www.example.com/commit-id.txt」にあると仮定します。次に、クライアントで、このテキスト ファイルの変更を監視し、目的のアクションを実行するシェル スクリプトを使用します。たとえば、Windows PowerShell を使用すると、これは次のように機能します。Mac の場合、別のシェルを使用する必要がありますが、このスクリプトは簡単に移植できると確信しています。
function get-current-commit-id {
trap [Exception] {
# Make sure the script doesn't freak out when server is down or connection
$commitid
return
}
# The rand.next() ensures by brute force that the text file is not cached
[int] $clnt.DownloadString("http://www.example.com/commit-id.txt?q="+$rand.next())
}
$clnt = new-object System.Net.WebClient
$commitid = get-current-commit-id
while( 1 ){
$commitidnew = get-current-commit-id
if( $commitidnew -ne $rsid ){
Write-Output "Commit occured on server"
### execute desired action here
### perhaps you'll also want to run "svn up"
$commitid = $rsidnew
}
### check for new update every 10 seconds
sleep 10
}