You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Phil Pinkerton <pc...@gmail.com> on 2009/09/28 19:21:57 UTC
pre-commit possible for specific subdirectory
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.
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2401374
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: pre-commit possible for specific subdirectory
Posted by Andy Levy <an...@gmail.com>.
On Mon, Sep 28, 2009 at 16:14, Phil Pinkerton <pc...@gmail.com> wrote:
>
>
> On Mon, Sep 28, 2009 at 3:27 PM, vishwajeet singh <de...@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 <pc...@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
loop
if do_stuff == true
do "something"
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2401395
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: pre-commit possible for specific subdirectory
Posted by Dextrous <de...@gmail.com>.
On Tue, Sep 29, 2009 at 1:44 AM, Phil Pinkerton <pc...@gmail.com>wrote:
>
>
> On Mon, Sep 28, 2009 at 3:27 PM, vishwajeet singh <de...@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 <pc...@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.
>>
>> --
>> Vishwajeet Singh
>> +91-9657702154 | dextrous85@gmail.com | http://singhvishwajeet.com
>> Twitter: http://twitter.com/vishwajeets | LinkedIn:
>> http://www.linkedin.com/in/singhvishwajeet
>>
>
>
>
> --
> " 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.
>
>
You can take a look at this python script
http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/pre-commit-check.pythis
does not do exactly what you want but can be good starting point
--
Vishwajeet Singh
+91-9657702154 | dextrous85@gmail.com | http://singhvishwajeet.com
Twitter: http://twitter.com/vishwajeets | LinkedIn:
http://www.linkedin.com/in/singhvishwajeet
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2401396
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: pre-commit possible for specific subdirectory
Posted by Phil Pinkerton <pc...@gmail.com>.
On Mon, Sep 28, 2009 at 3:27 PM, vishwajeet singh <de...@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 <pc...@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.
>
> --
> Vishwajeet Singh
> +91-9657702154 | dextrous85@gmail.com | http://singhvishwajeet.com
> Twitter: http://twitter.com/vishwajeets | LinkedIn:
> http://www.linkedin.com/in/singhvishwajeet
>
--
" 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.
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2401388
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
Re: pre-commit possible for specific subdirectory
Posted by Dextrous <de...@gmail.com>.
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 <pc...@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.
>
>
--
Vishwajeet Singh
+91-9657702154 | dextrous85@gmail.com | http://singhvishwajeet.com
Twitter: http://twitter.com/vishwajeets | LinkedIn:
http://www.linkedin.com/in/singhvishwajeet
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2401375
To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].