For my staging site I have a subversion repository that I update when I need to view the changes on the staging server. Instead of manually updating the staging server subversion folder every few minutes when I need to check something, I've got a script that automatically checks for any subversion updates. My problem is that each time an update is checked for, even if there aren't any changes, I think subversion might be changing some of the files in the .svn folders on the site and it's causing IIS to recompile the website which takes about 40 seconds. If there aren't any code file changes, I don't want IIS to recompile the website. Does anyone know a good way to fix this so that the site only gets recompiles on code changes and not after every update check?
views:
317answers:
5How do I prevent a subversion update with no changes from causing IIS from recompiling the website?
You would have to have a script check the current revision number of the repository before doing an update. If the revision number hasn't changed, don't perform an update.
You could change your script to do a diff first (with --summarize) then only perform an update if relevant files are in the diff summary list (*.cs, etc).
How about putting that code in a post-commit hook instead, that way it should only run after a proper commit?
Your solution is probably in your question: prevent IIS from looking at the .svn folders. No ideas here, but IIS should have a setting somewhere to exclude certain directories from the scan for changed files. Maybe mark the .svn folders using the hidden file attribute?
Google gives this forum as a place to ask about IIS configuration problems:
http://forums.iis.net/1034.aspx?PageIndex=18&forumoptions=0:1:11::
See the subversion FAQ : "I'm managing a website in my repository. How can I make the live site automatically update after every commit?"
You can also try the config setting "use commit times". See the Subversion book about details: http://svnbook.red-bean.com/en/1.5/svn.advanced.confarea.html#svn.advanced.confarea.opts.config