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

Re: pre-commit hook script to avoid unwanted. to complex ?

From: David Weintraub <qazwart_at_gmail.com>
Date: Thu, 24 Sep 2009 15:46:53 -0400

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
> 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
> first.
> This will avoid the commitment of millions of bytes of worthless data in
> the repository, increasing its size and slowing down the execution of
> Subversion.
> --
> " 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.

David Weintraub
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-09-24 21:47:40 CEST

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.