[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: hook to refuse commit if ignored files

From: Paul Koning <pkoning_at_equallogic.com>
Date: 2005-12-20 22:01:16 CET

>>>>> "Alex" == Alex Teslik <alex@acatysmoof.com> writes:

 Alex> I'm trying to make a pre-commit hook that refuses the commit if
 Alex> there are any files that are of the ignore type (the ones that
 Alex> show with a "?" in front of them when you run 'svn status'
 Alex> before commit). I don't want committers to forget to 'svn add'
 Alex> those files. How can I test for this case using svnlook (or any
 Alex> other method)?

You can't. Hook scripts run on the server. When you say "svn commit"
the server is told what will be committed, which by definition does
NOT include any "?" files. So at the server end you can't tell, and
you don't know what is in the client's working directory. You only
know what files the client said should be committed right now.

     paul

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sun Dec 25 03:42:48 2005

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.