You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Dong Jiwei <do...@keithley.com> on 2007/07/11 05:43:16 UTC

Hooks about change log and create privilege

Hi all,

 

         I want to write hooks to do the following things,

                   1. To insert the log information into the committed
script, just like the auto substitution of the keywords.

                            For example, I modified a shell script, and
commit with log message: "Fix the bug when inserting rows into table
oe_order_headers_all, SR number is 35467",

                            I want this message be inserted into the shell
script file after the $ChangeLog$ keywords. Just as the old version control
tool RCS do.

                   2. And I want to control the privilege of create a new
script file in the repository, I want only specific user can do the file
initialization work, other user can only check out the file, modify and
check in.

                            I think this can be judge in the hook
pre-commit, but I don't know how to get the operation status of the TXN, for
the TXN may include several files and directory. 

I must get the Add or Modify then can decide to pass the operation or deny. 

 

         Is there some one already have hooks that implied the functionality
that I mentioned, would you please send it to me for a reference example?

         Or someone would you please give me some advices about the two
hooks' development.

 

Thank you in advance!!

 

Regards,

 

Roy Dong



_____________________________________________________________________________
Scanned by IBM Email Security Management Services powered by MessageLabs. For more information please visit http://www.ers.ibm.com
_____________________________________________________________________________

RE: Hooks about change log and create privilege

Posted by Dong Jiwei <do...@keithley.com>.
Thank you very much Ryan,

The svnperms.py perfectly matches my request. Thank you again.

Regards,

Roy Dong

-----Original Message-----
From: Ryan Schmidt [mailto:subversion-2007b@ryandesign.com] 
Sent: 2007年7月11日 16:40
To: Dong Jiwei
Cc: users@subversion.tigris.org
Subject: Re: Hooks about change log and create privilege

On Jul 11, 2007, at 00:43, Dong Jiwei wrote:

>                    2. And I want to control the privilege of create  
> a new script file in the repository, I want only specific user can  
> do the file initialization work, other user can only check out the  
> file, modify and check in.
>
>                             I think this can be judge in the hook  
> pre-commit, but I don’t know how to get the operation status of the  
> TXN, for the TXN may include several files and directory.
>
> I must get the Add or Modify then can decide to pass the operation  
> or deny.

I think the svnperms.py script will do what you want.



____________________________________________________________________________
_
Scanned by IBM Email Security Management Services powered by MessageLabs.
For more information please visit http://www.ers.ibm.com
____________________________________________________________________________
_



_____________________________________________________________________________
Scanned by IBM Email Security Management Services powered by MessageLabs. For more information please visit http://www.ers.ibm.com
_____________________________________________________________________________

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


Re: Hooks about change log and create privilege

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jul 11, 2007, at 00:43, Dong Jiwei wrote:

>                    2. And I want to control the privilege of create  
> a new script file in the repository, I want only specific user can  
> do the file initialization work, other user can only check out the  
> file, modify and check in.
>
>                             I think this can be judge in the hook  
> pre-commit, but I don’t know how to get the operation status of the  
> TXN, for the TXN may include several files and directory.
>
> I must get the Add or Modify then can decide to pass the operation  
> or deny.

I think the svnperms.py script will do what you want.


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


Re: Hooks about change log and create privilege

Posted by Karl Fogel <kf...@red-bean.com>.
"Dong Jiwei" <do...@keithley.com> writes:
> Thank you very much for your reply.
>
> But our team is accustomed to the RCS system, they don't have the custom to
> add information into the script themselves, So, as a administrator, I hope
> to reduce their workload by a hook that can do thing as the auto
> substitution work as the Subversion svn:keywords property does.

I understand.  However, Subversion does not support this feature,
here's why:

   http://subversion.tigris.org/faq.html#log-in-source

Best,
-Karl

-- 
Subversion support & consulting  <>  http://producingoss.com/consulting.html

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

RE: Hooks about change log and create privilege

Posted by Dong Jiwei <do...@keithley.com>.
Hi Karl,

Thank you very much for your reply.

But our team is accustomed to the RCS system, they don't have the custom to
add information into the script themselves, So, as a administrator, I hope
to reduce their workload by a hook that can do thing as the auto
substitution work as the Subversion svn:keywords property does.


Regards,

Roy Dong
-----Original Message-----
From: Karl Fogel [mailto:kfogel@red-bean.com] 
Sent: 2007年7月11日 14:00
To: Dong Jiwei
Cc: users@subversion.tigris.org
Subject: Re: Hooks about change log and create privilege

"Dong Jiwei" <do...@keithley.com> writes:
>          I want to write hooks to do the following things,
>
>                    1. To insert the log information into the committed
script,
> just like the auto substitution of the keywords.
>
>                             For example, I modified a shell script, and
commit
> with log message: ?Fix the bug when inserting rows into table
> oe_order_headers_all, SR number is 35467?,

>                             I want this message be inserted into the shell
> script file after the $ChangeLog$ keywords. Just as the old version
control
> tool RCS do.

Subversion cannot do this automatically for you.  But as a workaround,
why don't you just insert the log data into the script yourself, when
you commit?  (You could even write something on the client side to
extract it from there and use it as the log message at commit time.)

-Karl

-- 
Subversion support & consulting  <>  http://producingoss.com/consulting.html

____________________________________________________________________________
_
Scanned by IBM Email Security Management Services powered by MessageLabs.
For more information please visit http://www.ers.ibm.com
____________________________________________________________________________
_



_____________________________________________________________________________
Scanned by IBM Email Security Management Services powered by MessageLabs. For more information please visit http://www.ers.ibm.com
_____________________________________________________________________________

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


Re: Hooks about change log and create privilege

Posted by Karl Fogel <kf...@red-bean.com>.
"Dong Jiwei" <do...@keithley.com> writes:
>          I want to write hooks to do the following things,
>
>                    1. To insert the log information into the committed script,
> just like the auto substitution of the keywords.
>
>                             For example, I modified a shell script, and commit
> with log message: ?Fix the bug when inserting rows into table
> oe_order_headers_all, SR number is 35467?,

>                             I want this message be inserted into the shell
> script file after the $ChangeLog$ keywords. Just as the old version control
> tool RCS do.

Subversion cannot do this automatically for you.  But as a workaround,
why don't you just insert the log data into the script yourself, when
you commit?  (You could even write something on the client side to
extract it from there and use it as the log message at commit time.)

-Karl

-- 
Subversion support & consulting  <>  http://producingoss.com/consulting.html

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