How do you get notified of your repository's updates?
Asked Answered
S

7

23

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.

Sruti answered 17/2, 2010 at 7:27 Comment(0)
C
33

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.

Cyanide answered 17/2, 2010 at 7:27 Comment(0)
R
5

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

Reaganreagen answered 17/2, 2010 at 7:27 Comment(1)
How do I start SVN Notifier? Is there an exe? It used to run itself, but I stopped it few days ago.Centennial
D
2

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

Daveen answered 17/2, 2010 at 7:27 Comment(0)
W
1

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.

Woodard answered 17/2, 2010 at 7:27 Comment(6)
What is the method of notification? It is not clear from the PowerShell code.Saxena
How is the user notified? For instance, is a new command-line window opened containing the notification text?Saxena
You can choose whatever: if-changed trunk { Send-Mail ... }. BaloonPopup is another popular choice.Woodard
What actually happens in the sample code as given? Does it very briefly (or not so briefly) display "Deploying trunk..." in something resembling a command line window (black window)?Saxena
If you run this script all the time it will display 'Deploy trunk' in the console. If you don't want to look into the console window you can run it hidden via for example TaskScheduler in which case message wont be seen but you use some other mechanism like BaloonPopup which will then pop up from tray with the message.Woodard
The easiest solution if console is hidden is probably this: $wshell = New-Object -ComObject Wscript.Shell; $wshell.Popup("Deploy trunk",0,"Done",0x1)Woodard
C
1

Email. An example SVN post-commit hook to send email can be found in subversion itself.

Cantara answered 17/2, 2010 at 7:27 Comment(0)
D
0

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.

Demisemiquaver answered 17/2, 2010 at 7:27 Comment(1)
It doesn't help. I would like to get notified.Sruti
M
0

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.

Menke answered 17/2, 2010 at 7:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.