You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by ch...@gmail.com on 2006/03/07 20:18:54 UTC

Serverside Scripting

Hi,
 Can anyone please tell me if Subversion supports server side scripting ?

 My requirements are

*) if a source file has variables like $Revision $Author that should get
replaced with commit version and author name. Something similar to what CVS
supports

*) Assuming my developers are responsible and provide good logging
information on every commit, I would like to consolidate for easy reference.

Essentially on server side, on every commit, I would like to update one or
more files in repository with current commit version, log text info etc.

--
thanks
chinmaya swaroop

Re: Serverside Scripting

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Mar 7, 2006, at 21:18, chinmayareddy@gmail.com wrote:

>  Can anyone please tell me if Subversion supports server side  
> scripting ?

Sure. Read the friendly book! :-)


>  My requirements are
>
> *) if a source file has variables like $Revision $Author that  
> should get replaced with commit version and author name. Something  
> similar to what CVS supports

The feature is called svn:keywords:

http://svnbook.red-bean.com/en/1.1/ch07s02.html#svn-ch-7-sect-2.3.4


> *) Assuming my developers are responsible and provide good logging  
> information on every commit, I would like to consolidate for easy  
> reference.
> Essentially on server side, on every commit, I would like to update  
> one or more files in repository with current commit version, log  
> text info etc.

These are called hook scripts:

http://svnbook.red-bean.com/en/1.1/ch05s02.html#svn-ch-5-sect-2.1


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

Re: Serverside Scripting

Posted by Andy Levy <an...@gmail.com>.
On 3/7/06, chinmayareddy@gmail.com <ch...@gmail.com> wrote:
> Hi,
>  Can anyone please tell me if Subversion supports server side scripting ?
>
>  My requirements are
>
> *) if a source file has variables like $Revision $Author that should get
> replaced with commit version and author name. Something similar to what CVS
> supports

Use keywords for this.  A commit script should not modify the contents
of a file being committed, because then the repository won't ever
match the developer's working copy. 
http://svnbook.red-bean.com/en/1.0/ch07s02.html

> *) Assuming my developers are responsible and provide good logging
> information on every commit, I would like to consolidate for easy reference.
> Essentially on server side, on every commit, I would like to update one or
> more files in repository with current commit version, log text info etc.

Again, a commit script modifying the repository is generally a bad
idea unless you can separate very strongly the files being committed
from the second update that the script is doing.

The "server side scripting" you're looking for is a feature called
"hooks" and these are pretty well-documented in Subversion resources
such as The Book (http://svnbook.org/).

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