New CommitRequirements: File content check
Brought to you by:
mmckechney
Hi,
That would be a great feature if SVNNotify allows to prevent commit of files whichconent contains predefined tag. For instance, to prevent local modifications which should be committed.
Configuration can be like following:
<FileContentCheck="Do not commit" Regex="\[don't commit\]"
RegexFailureMsg="Prevent committing files with tag [don't commit] within it's content"
RegexIgnoreCase="true"/>
Thanks,
Alex
I added this feature to the source code, but not to the compiled version today.
SVN-Log:
ADDED: PreCommitFileContentExclusion to prevent files with content matching a Regex to be committed.
Use FileContentExclusion in CommitRequirements to enable checking.
Regex is used to determine the files.
FileContentRegex is used to check the content of those files and if it succeeds refuses the commit.
Example:
<FileContentExclusion Description="Preventing 'test' in file content being committed" Regex=".*" FileContentRegex="test" RegexFailureMsg="File must not contain test" />