[英]How can I determine for a user svn the list of his locked files
What we need: in case of drop out a task or a development, the developer should unlock all files he is locking. 我们需要什么:万一退出任务或进行开发,开发人员应解锁他锁定的所有文件。
Is there a simple way to check for a specified USER the list of all files he is locking ? 有没有一种简单的方法来检查指定的USER他锁定的所有文件的列表?
We are running Subversion on a Linux server using svn version 1.8.11 (r1643975).
我们正在使用svn version 1.8.11 (r1643975).
的Linux服务器上运行Subversion version 1.8.11 (r1643975).
Use svnadmin lslocks
(requires local access to the whole repository, ie you have to be an administrator) and then grep
the output. 使用svnadmin lslocks
(需要对整个存储库的本地访问,即您必须是管理员),然后grep
输出。 Here is an example (I guess that you can search the web for a more complex one liner which will provide better output, eg with coloring): 这是一个示例(我想您可以在网络上搜索更复杂的一个衬纸,该衬纸将提供更好的输出,例如带有着色):
svnadmin lslocks PATH-TO-REPOSITORY | grep 'USERNAME' -B 2
Path: /trunk/lockedfile.docx
UUID Token: opaquelocktoken:a0ec5b2a-fb50-ec4e-bbd2-20eb61bae743
Owner: user
--
Path: /branches/devbranch/anotherlockedfile.bmp
UUID Token: opaquelocktoken:d3222e08-96a7-ec4d-89f2-11777027d526
Owner: user
Subversion allows you to steal or break locks , so it may be easier to allow your users to do this instead of using admin tools. Subversion允许您窃取或破坏锁 ,因此允许用户执行此操作比使用管理工具更容易。
BTW, in Subversion 1.8+ you can use svnadmin lock
and svnadmin unlock
commands to manage locks. 顺便说一句,在Subversion 1.8+中,您可以使用svnadmin lock
和svnadmin unlock
命令来管理锁。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.