Back to Blog
Subversion pre commit hook6/19/2023 ![]() ::Error.WriteLine("Only changes to 'svn:log' revision properties are allowed.") # Store hook arguments into variables with mnemonic names This PowerShell script allows to change svn:log property only and denies empty log messages. On Windows, you can use batch script or PowerShell-based script to implement some logic within pre-revprop-change hook. It will allow any authenticated user to change any revision property and it should not be used in real environment. The simplest hook can contain just one line: exit 0. To allow users to change properties, you have to create pre-revprop-change hook. You don't want everyone who has access to a repository to be able to modify all revision properties, so changing revision properties is forbidden by default. For example, if you commit a revision it immediately gets svn:date with UTC time of your commit, svn:author with your username and svn:log with your commit log message (if you specified any).Īs I already specified, the purpose of pre-revprop-change hook script is to control changes of revision properties. On the other hand, unversioned properties do not have any history and serve mostly maintenance purpose. Versioned properties have history and can be manipulated by ordinary users who have Read / Write access to a repository. ![]() svn:log and svn:date) that are set on repository revisions. unversioned (revision) properties (e.g.versioned properties (e.g svn:needs-lock and svn:mime-type) that can be set on files and directories,.There are 2 types of properties in Subversion: to send an email when revision property is changed). In short, the purpose of pre-revprop-change hook script is to control changes of unversioned (revision) properties and to send notifications (e.g. The name of the hook script is not so scary if you manage decipher it: it's pre revision property change hook. >
0 Comments
Read More
Leave a Reply. |