Is there a way to automatically poll svn for a released lock?

核能气质少年 提交于 2020-01-29 23:29:29

问题


On the project I'm working on, we have a file with svn:needs-lock that's frequently in contention. We frequently have to IM each other "let me know when you're done with X". If it's not really urgent, I would prefer not to interrupt my coworker if I don't have to.

Is there a util out there that will create a background process which will poll svn and pop a dialog or a system tray notification when the lock is released?

I'm on Windows and using TortoiseSVN, but even a python script that I could run in a command window would be better than nothing.


回答1:


SVN has hook scripts that can execute on lock/unlock events (read the SVN book). You could add an e-mail/IM notification command to one of these scripts.

Commit Monitor is also good for this kind of thing. http://tools.tortoisesvn.net/CommitMonitor




回答2:


Take a look on this Advanced Locking with SVN page. It describes techniques to determine the status of a file (Specifically look at the Discovering Locks section.) You could use that information to write a small program to "poll" the status and determine when the file has been locked/unlocked. Since you know the files that have the svn:needs-lock property, this ought to be pretty easy.



来源:https://stackoverflow.com/questions/1379472/is-there-a-way-to-automatically-poll-svn-for-a-released-lock

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!