Re: SVN hook

2021-08-25 Thread Pavel Lyalyakin
Hello,

On Wed, Aug 25, 2021 at 3:14 PM Daniel Sahlberg
 wrote:
>
> Den ons 25 aug. 2021 kl 13:56 skrev Justin MASSIOT | Zentek 
> :
>>
>> Thanks Stefan, I thought I've seen that feature in the past but I've been 
>> unable to find the documentation.
>> That's a pity there isn't an up-to-date documentation for the latest SVN 
>> releases, apart from the release notes... (or, is there any?)
>>
>> Justin MASSIOT  |  Zentek
>>
>>
>> On Wed, 25 Aug 2021 at 13:35, Stefan Sperling  wrote:
>>>
>>> On Wed, Aug 25, 2021 at 09:32:04AM +0200, Justin MASSIOT | Zentek wrote:
>>> > * As for the "can do / can't do", the standard way would be to enforce
>>> > "path-based
>>> > authorization
>>> > ",
>>> > but it isn't flexible at all because it doesn't support wildcards.
>>>
>>> Good news! Path-based authz does support wildcards as of 1.10.0:
>>> http://subversion.apache.org/docs/release-notes/1.10.html#authzperf
>
>
> I was also lost when wildcard path-based authz was discussed a few weeks ago. 
> Some help to write the documentation is surely welcome and I guess the 
> Subversion book's authors will appreciate a contribution. I'm planning to 
> look at it but it is fairly low on my list of priorities.
>
> Kind regards,
> Daniel Sahlberg


AFAIK in the past there was some discussion [1] about the future of
SVNBook. See this [2] thread, too.

[1]: https://svn.haxx.se/dev/archive-2018-09/0006.shtml
[2]: https://mailman.red-bean.com/pipermail/svnbook-dev/2016-March/008030.html

-- 
With best regards,
Pavel Lyalyakin
VisualSVN Team


Re: SVN hook

2021-08-25 Thread Daniel Sahlberg
Den ons 25 aug. 2021 kl 13:56 skrev Justin MASSIOT | Zentek <
justin.mass...@zentek.fr>:

> Thanks Stefan, I thought I've seen that feature in the past but I've been
> unable to find the documentation.
> That's a pity there isn't an up-to-date documentation for the latest SVN
> releases, apart from the release notes... (or, is there any?)
>
> Justin MASSIOT  |  Zentek
>
>
> On Wed, 25 Aug 2021 at 13:35, Stefan Sperling  wrote:
>
>> On Wed, Aug 25, 2021 at 09:32:04AM +0200, Justin MASSIOT | Zentek wrote:
>> > * As for the "can do / can't do", the standard way would be to enforce
>> > "path-based
>> > authorization
>> > <
>> https://svnbook.red-bean.com/en/1.8/svn.serverconfig.pathbasedauthz.html
>> >",
>> > but it isn't flexible at all because it doesn't support wildcards.
>>
>> Good news! Path-based authz does support wildcards as of 1.10.0:
>> http://subversion.apache.org/docs/release-notes/1.10.html#authzperf
>
>
I was also lost when wildcard path-based authz was discussed a few weeks
ago. Some help to write the documentation is surely welcome and I guess the
Subversion book's authors will appreciate a contribution. I'm planning to
look at it but it is fairly low on my list of priorities.

Kind regards,
Daniel Sahlberg


Re: SVN hook

2021-08-25 Thread Justin MASSIOT | Zentek
Thanks Stefan, I thought I've seen that feature in the past but I've been
unable to find the documentation.
That's a pity there isn't an up-to-date documentation for the latest SVN
releases, apart from the release notes... (or, is there any?)

Justin MASSIOT  |  Zentek


On Wed, 25 Aug 2021 at 13:35, Stefan Sperling  wrote:

> On Wed, Aug 25, 2021 at 09:32:04AM +0200, Justin MASSIOT | Zentek wrote:
> > * As for the "can do / can't do", the standard way would be to enforce
> > "path-based
> > authorization
> > <
> https://svnbook.red-bean.com/en/1.8/svn.serverconfig.pathbasedauthz.html
> >",
> > but it isn't flexible at all because it doesn't support wildcards.
>
> Good news! Path-based authz does support wildcards as of 1.10.0:
> http://subversion.apache.org/docs/release-notes/1.10.html#authzperf
>


Re: SVN hook

2021-08-25 Thread Stefan Sperling
On Wed, Aug 25, 2021 at 09:32:04AM +0200, Justin MASSIOT | Zentek wrote:
> * As for the "can do / can't do", the standard way would be to enforce
> "path-based
> authorization
> ",
> but it isn't flexible at all because it doesn't support wildcards.

Good news! Path-based authz does support wildcards as of 1.10.0:
http://subversion.apache.org/docs/release-notes/1.10.html#authzperf


Re: SVN hook

2021-08-25 Thread Justin MASSIOT | Zentek
Hi Philipp,

Not an expert either but from what I know, what you expect seems to be
possible.
I think the best way for you to learn about hooks - apart from the official
doc  -
is to look at the templates created by default when you create a repo
("svnadmin create"). You can also find some examples in the SVN repo:
https://svn.apache.org/viewvc/subversion/trunk/tools/hook-scripts/
https://svn.apache.org/viewvc/subversion/trunk/contrib/hook-scripts/

In your case, the way to go seems to be a *pre-commit* hook.
* For the commit message restriction, look at the examples.
* As for the "can do / can't do", the standard way would be to enforce
"path-based
authorization
",
but it isn't flexible at all because it doesn't support wildcards. I would
personally recommend the use of "svnperms
"
which should do what you want: advanced path-based control (with regular
expression support).

I have a kind of "framework for hooks" hosted on GitHub
, this may help as an example.

Justin MASSIOT  |  Zentek


On Wed, 25 Aug 2021 at 07:36, Philipp Mueller 
wrote:

> Hello,
>
> I´m new to this topic and I have quite a hard time getting into
> programming hooks for my problem. I need a hook which can distinguish
> between three different user groups:
>
> Group A: can do anything (delete tags and trunks, commit without comment)
>
> Group B: can commit to tags and delete tags/branches; CANNOT delete trunks
> and CANNOT commit without comment
>
> Group C: can commit to tags; CANNOT change or delete anything
>
> Is there any way to do that?
>
>
> I am very grateful for you help !
>
> Greetings
>
> Philipp from Germany
>
>


Re: SVN hook

2021-08-25 Thread Johan Corveleyn
On Wed, Aug 25, 2021 at 7:36 AM Philipp Mueller
 wrote:
> Hello,
>
> I´m new to this topic and I have quite a hard time getting into programming 
> hooks for my problem. I need a hook which can distinguish between three 
> different user groups:
> Group A: can do anything (delete tags and trunks, commit without comment)
> Group B: can commit to tags and delete tags/branches; CANNOT delete trunks 
> and CANNOT commit without comment
> Group C: can commit to tags; CANNOT change or delete anything
>
> Is there any way to do that?

I've used a predecessor of these pre-commit hook scripts for
implementing similar checks at my company:
https://github.com/qazwart/SVN-Precommit-Kitchen-Sink-Hook

They work really well and are quite easy to configure IMHO.

HTH,
-- 
Johan


SVN hook

2021-08-24 Thread Philipp Mueller
Hello,

I´m new to this topic and I have quite a hard time getting into programming 
hooks for my problem. I need a hook which can distinguish between three 
different user groups:

Group A: can do anything (delete tags and trunks, commit without comment)

Group B: can commit to tags and delete tags/branches; CANNOT delete trunks and 
CANNOT commit without comment

Group C: can commit to tags; CANNOT change or delete anything

Is there any way to do that?


I am very grateful for you help !

Greetings

Philipp from Germany



Re: Post svn hook

2014-05-16 Thread Ryan Schmidt

On May 15, 2014, at 17:51, Havlovick, Ron wrote:

> I am a newbie and I am more than a bit confused.
> Perhaps ya'll could tell me something. (Other than to …..)
>  
> I am on Windows using tortoise svn.
>  
> Here's what I want to do, and I am trying to figure out exactly how to do it.
> Please bear with me:
>  
> When I commit a file into the repository, I want the entire repository 
> directory(folder) to be checked out to a "golden directory(folder)".
> I do not care if it over writes any existing file in that golden 
> directory(folder).
> Create an empty text file in the golden directory(folder).
> In the empty text file write to it the revision number of the repository 
> directory(folder) and the date of the last commit (basically the date stamp 
> of the repository directory(folder).
>  
> I can write a perl script to basically copy files from one directory to 
> another (golden).
> read the data stamp of the directory(folder).  
> ctime(stat($directory….)->my_time)
>  
> What has got me baffled is:
> How to get the revision number of the repository directory(folder). (Is this 
> just a regular folder on the server and I just have the path 
> \\server\directory  wrong)
> How to get the date stamp of that repository directory(folder).  (This could 
> be if I have the path wrong then I am trying to read statistics on nothing.)
>  
> Assuming I have the perl script correct, where do I put the perl script in 
> what post_hook or post_commit?
> Do I call the perl script within the post_commit {  function or what…
> And where do I put the combined perl script post_hook script? (In the svn 
> directory on my PC or on the server)
>  
> When I run the perl script on a local directory via the command prompt, 
> everything works. (But I am not pointing to the repository, just a local 
> c:\folder.)

Look in the repository directory on the server. You should see among other 
things a "hooks" directory, containing sample scripts for each of the events 
for which Subversion can call hook scripts. These sample scripts have names 
ending in ".tmpl". They're written in Bash, which is for UNIX systems and won't 
usually work on Windows; for Windows, you'd need to write a batch script or a 
compiled executable. You'd place this script in the hooks directory, named the 
same as the relevant sample script, except without the ".tmpl" extension and 
with an extension appropriate for the type of file (e.g. "post-commit.bat" for 
a batch script, "post-commit.exe" for a compiled executable). Some other 
extensions are recognized by Subversion server on Windows as well, although I 
don't believe .pl is one of them, so you should probably write a small batch 
script or exe that runs your perl script.

The comments in the sample scripts tell you what arguments Subversion server 
supplies to the hook script when it runs it. For example, the post-commit 
script is given the repository path on disk as the first argument and the 
just-committed revision number as the second argument. So in Bash on UNIX, the 
repository path would be available as "$1" and the revision as "$2"; I don't 
know how that works in Windows batch files but there's probably a similar way 
to do that. So in Bash on UNIX, I could use that information to get the date of 
the commit by running "svnlook date $1 -r $2".



Post svn hook

2014-05-16 Thread Havlovick, Ron
I am a newbie and I am more than a bit confused.
Perhaps ya'll could tell me something. (Other than to .)

I am on Windows using tortoise svn.

Here's what I want to do, and I am trying to figure out exactly how to do it.
Please bear with me:

When I commit a file into the repository, I want the entire repository 
directory(folder) to be checked out to a "golden directory(folder)".
I do not care if it over writes any existing file in that golden 
directory(folder).
Create an empty text file in the golden directory(folder).
In the empty text file write to it the revision number of the repository 
directory(folder) and the date of the last commit (basically the date stamp of 
the repository directory(folder).

I can write a perl script to basically copy files from one directory to another 
(golden).
read the data stamp of the directory(folder).  
ctime(stat($directory)->my_time)

What has got me baffled is:
How to get the revision number of the repository directory(folder). (Is this 
just a regular folder on the server and I just have the path 
\\server\directory  wrong)
How to get the date stamp of that repository directory(folder).  (This could be 
if I have the path wrong then I am trying to read statistics on nothing.)

Assuming I have the perl script correct, where do I put the perl script in what 
post_hook or post_commit?
Do I call the perl script within the post_commit {  function or what...
And where do I put the combined perl script post_hook script? (In the svn 
directory on my PC or on the server)

When I run the perl script on a local directory via the command prompt, 
everything works. (But I am not pointing to the repository, just a local 
c:\folder.)

Thank you

Ron

___
This e-mail and any files transmitted with it are proprietary and intended 
solely for the use of the individual or entity to whom they are addressed. If 
you have reason to believe that you have received this e-mail in error, please 
notify the sender and destroy this email and any attached files. Please note 
that any views or opinions presented in this e-mail are solely those of the 
author and do not necessarily represent those of the Curtiss-Wright Corporation 
or any of its subsidiaries.  Documents attached hereto may contain technology 
subject to government export regulations. Recipient is solely responsible for 
ensuring that any re-export, transfer or disclosure of this information is in 
accordance with applicable government export regulations.  The recipient should 
check this e-mail and any attachments for the presence of viruses. 
Curtiss-Wright Corporation and its subsidiaries accept no liability for any 
damage caused by any virus transmitted by this e-mail.

Re: SVN - Hook Scripts

2010-06-07 Thread vishwajeet singh
There is no separate documentation as such for hook scripts its part of
Subversion book.
Same can be found here
http://svnbook.red-bean.com/en/1.4/svn-book.html#svn.reposadmin.create.hooks


On Mon, Jun 7, 2010 at 10:29 PM, Venkata Badipatla <
venkata_badipa...@persistent.co.in> wrote:

>  Hi All,
>
>
>
> Please any one of you send me the document of hooks scripts of Subversion.
>
>
>
> *Thanks,*
>
>
>
> *Venkata Badipatla **|** Systems Engineer - PMSG (Professional & Managed
> Services Group) **|** Persistent Systems*
>
> *venkata_badipa...@persistent.co.in* *  **|
> **Cell: +91-9657387160 **| **Tel: **+91 (20) 3023 4085*
>
> *Innovation in software product design, development and delivery - **
> www.persistentsys.com* 
>
>
>
> DISCLAIMER == This e-mail may contain privileged and confidential
> information which is the property of Persistent Systems Ltd. It is intended
> only for the use of the individual or entity to which it is addressed. If
> you are not the intended recipient, you are not authorized to read, retain,
> copy, print, distribute or use this message. If you have received this
> communication in error, please notify the sender and delete all copies of
> this message. Persistent Systems Ltd. does not accept any liability for
> virus infected mails.
>



-- 
Vishwajeet Singh
+91-9657702154 | dextrou...@gmail.com | http://bootstraptoday.com
Twitter: http://twitter.com/vishwajeets | LinkedIn:
http://www.linkedin.com/in/singhvishwajeet


SVN - Hook Scripts

2010-06-07 Thread Venkata Badipatla
Hi All,

Please any one of you send me the document of hooks scripts of Subversion.

Thanks,

Venkata Badipatla | Systems Engineer - PMSG (Professional & Managed Services 
Group) | Persistent Systems
venkata_badipa...@persistent.co.in  | 
Cell: +91-9657387160 | Tel: +91 (20) 3023 4085
Innovation in software product design, development and delivery - 
www.persistentsys.com


DISCLAIMER
==
This e-mail may contain privileged and confidential information which is the 
property of Persistent Systems Ltd. It is intended only for the use of the 
individual or entity to which it is addressed. If you are not the intended 
recipient, you are not authorized to read, retain, copy, print, distribute or 
use this message. If you have received this communication in error, please 
notify the sender and delete all copies of this message. Persistent Systems 
Ltd. does not accept any liability for virus infected mails.