You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Mark Baker <ma...@usefree.org> on 2006/10/19 00:58:10 UTC

Accepting / rejecting commits based on text embedded in the file

Hi,

Is it possible for SVN to check whether a file that is being added or modified contains a certain
string (such as a copyright statement, license, or VIM modlines) and based on that to either
accept or reject the commit? 

I’m working on an Free/Open Source project for which it is imperative that the license statement
remain intact, and I would like to use such an enforcement feature if it is available in SVN.

Thanks for your help,
Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

RE: Accepting / rejecting commits based on text embedded in the file

Posted by Mark Baker <ma...@usefree.org>.
--- Gavin Lambert <ga...@compacsort.com> wrote:
> Quoth Mark Baker <ma...@usefree.org>:
> > Is it possible for SVN to check whether a file that is being
> > added or modified contains a certain string (such as a
> > copyright statement, license, or VIM modlines) and based on
> > that to either accept or reject the commit?
> 
> I believe so, yes -- using a precommit hook script.
> 
>
<http://svnbook.red-bean.com/nightly/en/svn.reposadmin.create.html#svn.r
> eposadmin.create.hooks>


Thanks, this is just what I was looking for!

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

RE: Accepting / rejecting commits based on text embedded in the file

Posted by Gavin Lambert <ga...@compacsort.com>.
Quoth Mark Baker <ma...@usefree.org>:
> Is it possible for SVN to check whether a file that is being
> added or modified contains a certain string (such as a
> copyright statement, license, or VIM modlines) and based on
> that to either accept or reject the commit?

I believe so, yes -- using a precommit hook script.

<http://svnbook.red-bean.com/nightly/en/svn.reposadmin.create.html#svn.r
eposadmin.create.hooks>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org