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

svnlook cat -t $TXN $REPO broken ?

From: Phil Pinkerton <pcpinkerton_at_gmail.com>
Date: Fri, 25 Sep 2009 14:32:47 -0400

Seems that trying to create a pre-commit hook script that limits the size of
a file to be committed is not an easy task.

svnlook has been recommended but I have yet to see it work properly the "-t"
option does not seem to find the transaction.

svnlook cat -t $TXN $REPO always returns an error

# Check file size. do not allow Access files greater than 1MB.

    # get a list of all the files changed
    $SVNLOOK changed -t "$TXN" "$REPOS" | while read type file
        # skip all the files unless they end in .mdb
        [ ${file##*.} != "mdb" ] && continue #Skip unless a .mdb suffix
        # I cat out the file and then count the characters.
        # If it is greater than 1mb, I put it in my error array.
        # Is there a better way to get the size of a file w/ svnlook?
                       if [ $($SVNLOOK cat -t "$TXN" "$REPOS" $file | wc
-c) -ge "1000000" ]
error here ?? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
           $error["$file"]=""$file: We can't commit Access databases larger
than 1mb"

" 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-25 20:33:37 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.