颠覆。指标。以编程方式获取签入中每个文件的添加/更新代码行

发布于 2024-08-28 16:56:22 字数 140 浏览 5 评论 0原文

我需要你的建议。在我的应用程序中,我需要以编程方式获取用户签入的此类指标,作为签入中每个文件的添加/更新代码行。这个应用程序是用 C# 编写的,并使用 Subversion 作为版本控制系统。 我该怎么做呢?请向我提供您的想法...

非常感谢! (:

I need your advice. In my application I need to get programmatically such metrics for users check-ins as lines of added/updated code for each file in check-in. This app is writed on c# and uses the Subversion as version control system.
How can I do it? Offer me your ideas please...

Thanks a lot! (:

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

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

发布评论

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

评论(2

旧人九事 2024-09-04 16:56:22

“钩子”基本上是当特定的 svn 事件发生时被触发的程序。因此,每次提交后都会触发提交后挂钩。如果您有权访问 svn 存储库(作为管理员,而不仅仅是用户),您应该转到 /path/to/repo/hooks
目录并查看运行的各种挂钩的模板。使用 post-commit.tmpl 文件作为模板并添加您想要的任何内容。请注意,无论什么程序/脚本作为钩子运行,都会自动获取诸如存储库名称、正在签入的当前修订版等参数作为命令行参数。请参阅此处以供参考:

http ://svnbook.red-bean.com/nightly/en/svn.reposadmin.create.html#svn.reposadmin.create.hooks

然后你可以接受参数并在每次提交后做任何你喜欢的事情,包括计算差异行或者你有什么。

well "hooks" are basically programs that get triggered when a particular svn event happens. Accordingly, the post-commit hook gets triggered after every commit. If you have access to your svn repository (as an admin, not just as a user), you should go to /path/to/repo/hooks
directory and see the templates of various hooks that get run. Use the post-commit.tmpl file there as a template and add whatever you want. Note that whatever program/script gets run as the hook, automatcially gets arguments like name of the repo, current revision being checked in etc. as command line arguments. See here for reference:

http://svnbook.red-bean.com/nightly/en/svn.reposadmin.create.html#svn.reposadmin.create.hooks

Then you can take the arguments and do whatever you like after every commit, including counting diff lines or what have you.

晚风撩人 2024-09-04 16:56:22

您可以使用提交后挂钩来自动添加它。只需解析 svnlook diff 输出即可完成。

看看这个例子: http://techchorus .net/writing-php-script-send-svn-commit-changeset-email-notification

You could use a post-commit hook to automatically add it. Just parse the svnlook diff output and you're done.

Have a look at this example: http://techchorus.net/writing-php-script-send-svn-commit-changeset-email-notification

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