subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Stieger" <Andreas.Stie...@gmx.de>
Subject Re: precommit hook to prevent large commits?
Date Thu, 30 May 2019 07:12:47 GMT


> I'm looking to update my precommit hook to reject commits that are larger than x megabytes.

The proposed transaction is passed as a parameter to the hook.
Hand that to svnlook (svnlook -t $TXN changed), and iterate over all entries.
Filter out deletions and directory changes.
For each file get size (svnlook -t $TXN filesize) and sum it up.
Evaluate and return hook as required.

Andreas

Mime
View raw message