查看 Subversion 中锁定哪些文件的最佳方法是什么? [英] What is the best way to see what files are locked in Subversion?

查看:30
本文介绍了查看 Subversion 中锁定哪些文件的最佳方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我终于让我的团队从 SourceSafe 切换到 Subversion.不幸的是,我的经理仍然想对每个文件使用排他锁.所以我在每个文件上设置了 svn:needs-lock 属性并创建了一个预提交钩子以确保该属性保持设置.

I finally got my group to switch from SourceSafe to Subversion. Unfortunately, my manager still wants to use exclusive locks on every single file. So I set the svn:needs-lock property on every file and created a pre-commit hook to make sure the property stays set.

我们在 Linux 服务器上运行 Subversion.我们大多数人使用 Windows 机器,少数人使用 Mac.我们正在使用各种 SVN 客户端(TortoiseSVN、SmartSVN、Subclipse 等).

We are running Subversion on a Linux server. Most of us use Windows machines and a few use Macs. We are using various SVN clients (TortoiseSVN, SmartSVN, Subclipse, etc.).

我们现在需要的是一种很好/简单的方法来查看当前在整个存储库中锁定的所有文件(以及谁锁定了这些文件).我在 Tortoise 和 Subclipse 中摸索了一些,但没有找到我要找的东西.我们的项目有许多子目录,这些子目录是多层次的,所以查看每个单独的目录太费时了.

What we now need is a good/easy method to see all the files that are currently locked in the entire repository (and who has them locked). I have poked around a little in Tortoise and Subclipse, but haven't found what I am looking for. Our projects have many subdirectories that are multiple levels deep, so it would be too time consuming to look at each individual directory.

我想要的是我可以运行的单个报告,其中列出当前锁定的所有内容以及锁定的对象.获取此类信息的最佳方式是什么?

What I would like is a single report I can run that lists everything that is currently locked and who has it locked. What is the best way to get this type of information?

推荐答案

您正在寻找的是 svnadmin lslocks 命令.

What you're looking for is the svnadmin lslocks command.

我在工作中进行了此设置,因为我们在 Subversion 存储库中保留了一些 Word 文档(使用 svn:needs-lock).我设置了一个 cron 作业,每天检查锁列表并将所有超过 7 天的锁的报告通过电子邮件发送给整个团队.这样我们就可以知道谁在文档的锁定副本上偷懒了很长时间.

I have this set up at work because we keep some Word documents in our Subversion repository (with svn:needs-lock). I have a cron job set up that every day, checks the list of locks and emails a report of all locks older than 7 days to the whole team. That way we can tell who has been slacking and sitting on a locked copy of a document for a long time.

这篇关于查看 Subversion 中锁定哪些文件的最佳方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆