Notify of any change in a readonly SVN repository?

笑着哭i 提交于 2020-01-25 02:56:06

问题


I'm migrating to Mercurial from SVN, and we are making the old SVN repository read-only.

I want to find a way to get notified if anything changes in the old SVN repository after it is supposedly set to Read Only. However, I don't have direct access to add hooks to SVN or any other typical solution.

I know there are probably better ways to prevent this problem, but I'm mainly being paranoid that somehow someone might be able to work around the SVN security, so just humor me.

One idea I had was to keep my existing CruiseControl.NET builds but make them automatically fail if anything new changes. What else is possible?


回答1:


You could use SVN Notifier. Almost no setup required; simply point the tool to the working copy to read the svn URL from and you're done. The checking interval can be configured. That's it!




回答2:


You can configure the permissions of the Subversion repository as "read-only" whether it is being serviced via Apache's httpd or via svnserve. This is actually the preferred method instead of setting up a pre-commit hook that always returns a exit 1. The configuration is simple to do, and since you have to configure the Subversion repository anyway, why not just do it that way?

Of course, you probably also would like to watch the file system too in order to make sure it doesn't change. You can use things like Hudson or CruiseControl to watch the directory structure, but these normally have to be on the same machine as the Subversion repository.

You can also use Sventon which is a web-based Subversion repository browser. Like other browsers, Sventon has RSS feeds that you can subscribe to. Changes in the repository will be reported via RSS feeds.

The big advantage with Sventon over Hudson, CruiseControl and even WebSVN is that Sventon doesn't have to sit on your Subversion server because it doesn't need access to svnlook. If you don't have enough access put a two line pre-commit hook in your Subversion repository, you probably don't have the ability to put things like Hudson on your server either.

Hudson and CruiseControl can also watch your repository via the "svn co" command, and will report back to you via mail or RSS if it "does a build" because it detects a change in the repository. That does mean these two tools don't have to sit on your Subversion server, but they will end up checking out your entire repository (all branches, tags, etc) in order to do this. Not something you probably want to do.




回答3:


I don't know if it's a bit too much for what you're wanting, but WebSVN gives you an RSS feed that you can then subscribe to in an RSS reader. That way you just need to monitor the RSS feed. In addition, it provides a read-only web front-end into the SVN repository, so you could do away with having SVN local copies of code.




回答4:


Set a cronjob of

svn status

that mails its output to you? I don't have Subversion installed at the moment, but I don't think it adds any headers or whatnot - you could pipe the output through something to remove lines if it does, so it only emails you changes.



来源:https://stackoverflow.com/questions/4379238/notify-of-any-change-in-a-readonly-svn-repository

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!