No, but you could probably do some type of pre-commit hook that will request a 
verification log message or something. They have to type some random string. 
you would have to save the string some where or something like:

Commit failed, sensitive file included in change set. To verify that you want 
to update this file please enter "ABGHY5" in your commit message.

So, in the pre-commit hook you check to see if you have a sensitive file. Then 
check to see if you have a confirm string saved for the file in question. You 
might use a convention on your server like... filename.ext.confirm. If that 
file exists read the confirm string and see if it is contained in the change 
log. You will probably want to delete .confirm files that are older than say 5 
minutes or something.

You could also have some type of password that always allows the commit to go 
through... of course, that is dangerous... admins can make mistakes too.

Not very elegant but it should work.

I think a better idea is to not automatically promote stuff that has been 
checked into svn to production. You should have a staging server were stuff 
goes to first where you run your test suite... have a human decide if the 
staging should be prompted to production.

BOb


From: Hernan Castagnola [mailto:castagno...@gmail.com]
Sent: Wednesday, January 20, 2010 3:57 PM
To: users@subversion.apache.org
Subject: Ask for confirmation when a File is updated

Hi all,

            Is there any way (e.g editing the svn-properties) to make svn give 
an Alert, or ask for confirmation when a sensitive file is updated.
          I have been searching and I didn't find anything.

Example

Config.groovy is a sensitive file

so on a Server X

you set Config.groovy as a sensitive file

when you run

svn up  and Config.groovy has been changed on the server, it tells you

Config.groovy has been changed on ther server.....
Yes, No, Diff, etc
(as when you have a conflict)


I am asking this, because sometime files are committed by mistake. And maybe is 
a good way to catch them before going to production.

Thanks in advance for your help

Reply via email to