[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: pre-commit possible for specific subdirectory

From: Andy Levy <andy.levy_at_gmail.com>
Date: Mon, 28 Sep 2009 16:24:17 -0400

On Mon, Sep 28, 2009 at 16:14, Phil Pinkerton <pcpinkerton_at_gmail.com> wrote:
> On Mon, Sep 28, 2009 at 3:27 PM, vishwajeet singh <dextrous85_at_gmail.com>
> wrote:
>> the only option which I see for you is to check the affected path in
>> commit and execute only if its the path which you want to execute for.
>> On Tue, Sep 29, 2009 at 12:51 AM, Phil Pinkerton <pcpinkerton_at_gmail.com>
>> wrote:
>>> I have a pre-commit hook script that works fine for a particular
>>> repository.
>>> Is it possible to direct this pre-commit hook script to only be affective
>>> for a particular subdirectory ?
>>> for example  I want to only apply the pre-commit to
>>> /svn/Repository/Project1/subdirA
>>> Where Project1 is the root which also contains subdirB and subdirC.
>>> Phil
>>> --
>>> " The fundamental principle here is that the justification for a physical
>>> concept lies exclusively in its clear and unambiguous relation to the facts
>>> that it can be experienced"   AE
>>> Please Feed and Educate the Children... it's the least any of us can do.
>> What might that look like ? an example would be helpful.

Assuming you only want to do "something" on each commit once:

set "do_stuff" flag to false
svnlook changed (capture output)
For each item returned
  If item matches /svn/Repository/Project1/subdirA set "do_stuff" = true

if do_stuff == true
  do "something"


To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-09-28 22:25:07 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.