您如何收到存储库更新的通知?

发布于 2024-08-22 00:57:08 字数 358 浏览 7 评论 0原文

我正在工作中处理多个存储库,如果 SVN 存储库发生任何变化,我希望得到通知。

我制作了一个小的 BAT 脚本(是的,BAT 有时很有用),它不断在我的工作副本上执行 svn log -r BASE:HEAD 。它显示所有提交评论和修订日期。它工作得很好,但对于不同的存储库来说并不舒服。

您如何跟踪存储库中的更改?您使用自己编写的小程序吗?你使用别人制作的软件吗? 我对解决这个问题的每一种方法都很感兴趣。

我想获得通知以及有关提交的更多信息。 IDE 集成功能很好,但只有在我请求信息时才有效。
我不想采取行动来获取此信息。

平台:Windows、Subversion 1.5 及更高版本。

I'm working on several repositories at work and would like to be informed, if anything changes in the SVN repositories.

I made a small BAT script (yes, BAT is useful sometimes) that keeps executing an svn log -r BASE:HEAD on my working copy. It shows all submit comments and revision dates. It works really well, but it's not comfortable for different repositories.

How do you keep track of changes in your repositories? Do you use a small program you made for yourself? Do you use software someone else made?
I'm interested in every approach to this problem.

I would like to get notifications and more information about the commit. The IDE integrated functions are good, but work only if I request the information.
I don't want to act to get this information.

Platform: Windows, Subversion 1.5 and higher.

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

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

发布评论

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

评论(7

只是偏爱你 2024-08-29 00:57:09

如果您安装了TortoiseSVN,那么您可以使用SVN 通知程序

If you have TortoiseSVN installed, then you could use SVN Notifier.

兲鉂ぱ嘚淚 2024-08-29 00:57:09

我安装了 WebSVN 并订阅了我感兴趣的路径的 RSS 提要。

I have WebSVN installed and subscribe to RSS feeds of the paths I'm interested in.

纸伞微斜 2024-08-29 00:57:09

我使用 PowerShell 来检测 SVN 分支上的更改并进行部署。该脚本应该从 Task Scheduler 调用并从 SVN 根目录执行(或者您可以简单地循环并执行)永远睡眠):

function get-revision() {
    $rev = svn info 2>&1 | sls '^Last Changed Rev:' | out-string
    $rev = $rev -split ':'
    $rev[1].Trim()
}

function if-changed([string]$branch, [scriptblock]$script) {
    Write-Verbose "Checking for changes: $branch"
    pushd $branch
    $r = get-revision

    if ($r -gt $status[$branch]) {
        Write-Verbose "|- '$branch' changed, revision $r"
        & $script
    }
    else { Write-Verbose "|- '$branch' is up to date at revision $r" }
    $status[$branch] = $r
    popd
}

svn update
Write-Verbose "Getting the deploy status"
if (Test-Path status) { $status = Import-Clixml status } else { Write-Verbose "|- No status found"; $status=@{} }

if-changed trunk { "Deploying trunk..." }

这比使用上述任何第三方应用程序更容易和便携。

I use PowerShell to detect changes on an SVN branch and deploy. This script should be called from Task Scheduler and executed from the SVN root (or you can simply loop and sleep forever):

function get-revision() {
    $rev = svn info 2>&1 | sls '^Last Changed Rev:' | out-string
    $rev = $rev -split ':'
    $rev[1].Trim()
}

function if-changed([string]$branch, [scriptblock]$script) {
    Write-Verbose "Checking for changes: $branch"
    pushd $branch
    $r = get-revision

    if ($r -gt $status[$branch]) {
        Write-Verbose "|- '$branch' changed, revision $r"
        & $script
    }
    else { Write-Verbose "|- '$branch' is up to date at revision $r" }
    $status[$branch] = $r
    popd
}

svn update
Write-Verbose "Getting the deploy status"
if (Test-Path status) { $status = Import-Clixml status } else { Write-Verbose "|- No status found"; $status=@{} }

if-changed trunk { "Deploying trunk..." }

This is far easier and portable than using any of the above mentioned third-party applications.

月亮是我掰弯的 2024-08-29 00:57:09

svn 信息 | grep Revision 对我有用。例如,它表明:

Revision: 183

如果它与我认为应该发生的变化不同,那么我会进一步调查。

svn info | grep Revision works for me. It shows, for example:

Revision: 183

If it's changed from what I think it should, then I investigate further.

深海夜未眠 2024-08-29 00:57:09

我用来

svn status --show-updates

向您显示我已更改的文件以及存储库中已更改的文件。

你可以使用 Subversion 的钩子脚本 设置通知。

I use

svn status --show-updates

to show you which files I've changed as well as those files which have changed in the repository.

You could use Subversion's hook scripts to set up notifications.

断念 2024-08-29 00:57:08

我正在使用 CommitMonitor;它来自 TortoiseSVN 开发人员之一。您可以轻松添加多个 SVN URL 来监控并指定检查提交的时间间隔。如果发现任何更新,它会在屏幕一角显示一个小弹出窗口。

还有SVN Monitor,但使用和设置稍微复杂一些。除了在提交时提供消息之外,它还可以显示您修改了哪些文件并提醒您提交更改。

I'm using CommitMonitor; it's from one of the TortoiseSVN developers. You can easily add several SVN URLs to monitor and specify an interval to check for commits. If any updates are found, it shows a little popup windows in the corner of the screen.

There is also SVN Monitor, but that is a bit more complicated to use and setup. Besides giving a message on commits, it can also show you which files you have modified and remind you to commit your changes.

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