I take it this is written in VisualBasic? Not familiar with the syntax, but
that's pretty much how you'd do it. One comment is to print out something to
STDERR to explain why the commit failed. This should include the name of the
file rejected and the reason.
You should also not exit the commit script immediately. Instead, go through
all the files to be committed, and store all the errors (file name and
reason for the rejection) in an array. Then when you finish looping through
all the files, check to see if you have any errors. If you do, print them
all out and cancel the commit.
That way, if someone has a half dozen files that cannot be committed,
they'll see all the errors at once and can fix them all before doing a
second commit. Otherwise, they'll fix the first error, commit, see that
there's an other error, fix that one, commit again, etc.
On Thu, Sep 24, 2009 at 3:37 PM, Phil Pinkerton <pcpinkerton_at_gmail.com>wrote:
> Develop a pre-commit hook script with the following action:
> if filename extension = ".mdb" then
> if filename.size > 1mb then
> CANCEL COMMIT
> END of script
> end if
> end if
> end if
> Complete COMMIT
> This is required to avoid placing Access databases into the repository that
> might contain unwanted test data or have not been compacted and cleaned
> This will avoid the commitment of millions of bytes of worthless data in
> the repository, increasing its size and slowing down the execution of
> " The fundamental principle here is that the justification for a physical
> concept lies exclusively in its clear and unambiguous relation to the facts
> that it can be experienced" AE
> Please Feed and Educate the Children... it's the least any of us can do.
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-09-24 21:47:40 CEST