我如何知道谁签出了文件?

发布于 2024-09-16 22:01:35 字数 261 浏览 3 评论 0原文

我正在寻求为我的团队实施源代码控制。出现的一个外部要求是“经理/领导”想知道谁在何时检查了哪个文件。并不是真正的锁,他们只是想知道文件何时以及由谁取出。这也是一个令人惊叹的要求,超出了我的控制范围。

我主要考虑使用 Subversion。我想如果我通过 Apache 使用它,那么我可以解析 HTTP 日志,除非已经有一个工具可以做到这一点,无论是第 3 方 Web 日志分析工具还是直接为 subversion 创建的工具。

还有其他流行的源代码控制工具可能具有这种功能吗?

I'm looking to implement source control for my team. An external requirement that came up is that "managers/leads" want to know who has checked out which file and when. Not really a lock, they just want to know when a file was taken out and by who. It's also a show stopper requirement and is beyond my control.

I'm mainly looking at using Subversion. I figure if I use it through Apache, then I can parse the HTTP logs, unless there's already a tool for that, either 3rd party web log analysis tool or something directly created for subversion.

Any other popular source control tools that may have this kind of feature?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

困倦 2024-09-23 22:01:35

免费的源代码控制系统不会向您提供此信息,因为它们与服务器断开连接 - 您可以“获取”文件,但在您检查之前不必告诉服务器您已经更改了它这本身就是一个经过深思熟虑的功能,因为这意味着您可以在路上、在家等地方工作,而无需受限于中央存储库。

锁可以在颠覆中使用,以达到某种效果以获得类似的报告,但这不是一个很好的解决方案。它们旨在防止两个人同时修改文件,特别是在合并出现问题的情况下。也就是说,它们实际上并不能阻止某人在没有获得锁定的情况下签入文件,因此它们充其量只是一个弱指示,而不是保证。

此外,没有任何更现代的分布式系统(例如 git 或 Mercurial)甚至可以开始为您提供此信息,存储库位于您的计算机上,而不是集中式,并且返回到原始版本的链接也很脆弱。考虑一下 - 您有 5 个本地分支,您是否将所有文件报告为针对原始文件进行了修改,还是仅报告了活动分支?您可以从已经克隆的存储库中克隆存储库,您需要遵循多少个抽象级别才能到达“主”存储库?谁来决定,您将如何配置该主人? Git 等人可以非常优雅地处理所有这些复杂性,但是“谁签出了这个文件”的问题在这种情况下几乎没有意义。

TFS 和 Perforce 等老牌软件确实允许这样做。但我很好奇为什么他们需要这个功能,仅仅因为有人修改了文件的副本,在管理方面并没有真正的意义,分支仍然可以使用存储库安全性、任何任务跟踪系统(如 trac 或redmine 会告诉你谁在做什么,并与 svn 完美集成。

可能有第三部分应用程序查找工作副本并将状态信息上传到中央报告服务器,但我还没有看到。甚至可能值得制作一个。

Free source control systems don't tend to give you this information because they work disconnected from the server - you can 'get' a file, but you don't have to tell the server that you've changed it until you come to check in. This is itself a deliberate feature, as it means that you can work on the road, at home, etc, without being tethered to the central repository.

Locks can be used in subversion to some effect to get similar reporting, but it's not a great solution. They're designed to prevent 2 people modifying a file at the same time, specifically where merges are a problem. That said, they don't actually prevent someone checking in a file without getting the lock, so they're a weak indication at best, not a guarantee.

Also, none of the more modern distributed systems, like git or mercurial can even begin to give you this information, the repositories are on your machine, not centralised, and links back to the original are tenuous as best. Consider - you've got 5 local branches, do you report all the files as being modified against the original, or just the active branch? You can clone repos from already cloned repos, how many levels of abstraction do you follow to get to the 'master' repo? Who decides, and how would you configure what that master is? Git et al can handle all this complexity with great grace, but the question 'who has checked out this file' is almost meaningless in this context.

The old stalwarts like TFS and Perforce do allow this. But I'd be curious why they need this feature, just because someone has a modified copy of a file doesn't really mean anything in management terms, branches can still be protected very effectively using repository security, any task tracking system like trac or redmine will tell you who's doing what and integrate with svn perfectly.

There may be 3rd part applications that look for working copies and upload status information to a central reporting server, but I've not seen one. It might even be worth making one.

浅唱々樱花落 2024-09-23 22:01:35

作为一名开发人员,我会感到一定的不适,但您的“经理”想要的是基于客户端的“间谍”程序。这可以作为 eclipse 插件来实现,例如它收集有关打开和编辑哪些文件等的静态信息。

旁注:了解一下你的上司。如果他们还没有经历过缺乏合格 IT 人员的经历,那么通过这样的课程,他们很快就会遇到这种情况。

良好的项目管理采用侵入性较小的方法来收集有关进度和有效性的信息。

I as a developer would feel a certain discomfort but what your "managers" want is a client-based "spy" programm. This could be implemented as eclipse plugin for example which gathers statics about what files are opened and edited or whatever.

On a side note: Get some sense into your superiors. If they haven't experienced the lack of qualified IT-personel yet, then with a course like this soon they might.

Good project management applies less invasive methods to gather information about progress and effectivity.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文