You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Jacky Chan <ja...@gmail.com> on 2007/03/06 03:30:22 UTC

Restrict Commit Files Types

Dears,

I am running SVN with svnserve, and I am considering the approaches for
setting up the restriction of committing a file.
In my own experience, by setting up the properties of svn:ignore and the
global-ignore in .subversion can achieve to goal in the way by setting up
the ignore list.
But it seems the ignore list resides in client side, that means user can
modify the list and so as the properties to again commit the files that are
set ignore before.

I would like to ask is there any way to set the ignore list on the server
side? and some other related but indirect way to set the list that can
restrict user to not commit certain files.

Thank you very much and I am looking forward to your reply.

-- 
Yours Sincerely,
Jacky Chan

Re: Restrict Commit Files Types

Posted by Jacky Chan <ja...@gmail.com>.
Dear Peter & Ryan,

I tried yours suggestion, it works fine and very good.
My SVN client is subversive, and I found that only among the 3  SVN
programming clients it provides, they are

# Native JavaHL
# JavaSVN
# Subversive Default

JavaSVN doesn't display the error message from the pre-commit hook script on
the eclipse console.

Subversive Default displays the error message on the eclipse console, but no
error message box comes out.

Native JavaHL not only displays the error message on the eclipse console,
but also display they error message box.

I choose Native JavaHL in the subversive client settings.

Hope it helps and thank for all of your help. ^.^

2007/3/7, Ryan Schmidt <su...@ryandesign.com>:
>
>
> On Mar 6, 2007, at 07:22, Peter Münster wrote:
>
> > On Tue, 6 Mar 2007, Jacky Chan wrote:
> >
> >> But I need to return to the client for the violation, I am writing
> >> with bash
> >> shell script.
> >> How can I return the error message to the STDERR? Since the
> >> examples in
> >> subversion official site are written in python or perl.
> >
> > For example:
> > echo "$0: wrong file type." 1>&2
>
> Also, don't forget to exit with a nonzero return value, otherwise the
> stderr text won't be sent to the client:
>
> echo "$0: wrong file type." 1>&2
> exit 1
>
>
>
> --
>
> To reply to the mailing list, please use your mailer's Reply To All
> function
>
>
>


-- 
Yours Sincerely,
Jacky Chan

Re: Restrict Commit Files Types

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Mar 6, 2007, at 07:22, Peter Münster wrote:

> On Tue, 6 Mar 2007, Jacky Chan wrote:
>
>> But I need to return to the client for the violation, I am writing  
>> with bash
>> shell script.
>> How can I return the error message to the STDERR? Since the  
>> examples in
>> subversion official site are written in python or perl.
>
> For example:
> echo "$0: wrong file type." 1>&2

Also, don't forget to exit with a nonzero return value, otherwise the  
stderr text won't be sent to the client:

echo "$0: wrong file type." 1>&2
exit 1



-- 

To reply to the mailing list, please use your mailer's Reply To All  
function


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


Re: Restrict Commit Files Types

Posted by Peter Münster <pm...@deltadore.com>.
On Tue, 6 Mar 2007, Jacky Chan wrote:

> But I need to return to the client for the violation, I am writing with bash
> shell script.
> How can I return the error message to the STDERR? Since the examples in
> subversion official site are written in python or perl.

For example:
echo "$0: wrong file type." 1>&2

Greetings, Peter

-- 
http://pmrb.free.fr/contact-DD/

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

Re: Restrict Commit Files Types

Posted by Jacky Chan <ja...@gmail.com>.
Dears,

I am try to write the hook script for pre-commit event, I use svnlook change
to see the files going to commit.
And grep thier name to see is it ends with the certain file type...

But I need to return to the client for the violation, I am writing with bash
shell script.
How can I return the error message to the STDERR? Since the examples in
subversion official site are written in python or perl.

Thank you very much!!


2007/3/6, Matt Sickler <cr...@gmail.com>:
>
> The book: http://svnbook.red-bean.org  one of the later chapers has the
> stuff on hooks
>
>
> On 3/5/07, Jacky Chan <ja...@gmail.com> wrote:
> >
> > Dear Matt,
> >
> > Thank you very much for the reply.
> > Yeap, I am start to take a look at it though, is there any good
> > HOWTO/tutorial to quickly get start?
> >
> > 2007/3/6, Matt Sickler < crazyfordynamite@gmail.com>:
> > >
> > > svn:ignore is only precautionary - it in no way FORCES anything
> > >
> > > if you want to deny certain files from being committed you need a
> > > pre-commit hook that checks for them
> > >
> > > On 3/5/07, Jacky Chan <ja...@gmail.com> wrote:
> > > >
> > > > Dears,
> > > >
> > > > I am running SVN with svnserve, and I am considering the approaches
> > > > for setting up the restriction of committing a file.
> > > > In my own experience, by setting up the properties of svn:ignore and
> > > > the global-ignore in .subversion can achieve to goal in the way by setting
> > > > up the ignore list.
> > > > But it seems the ignore list resides in client side, that means user
> > > > can modify the list and so as the properties to again commit the files that
> > > > are set ignore before.
> > > >
> > > > I would like to ask is there any way to set the ignore list on the
> > > > server side? and some other related but indirect way to set the list that
> > > > can restrict user to not commit certain files.
> > > >
> > > > Thank you very much and I am looking forward to your reply.
> > > >
> > > > --
> > > > Yours Sincerely,
> > > > Jacky Chan
> > >
> > >
> > >
> >
> >
> > --
> > Yours Sincerely,
> > Jacky Chan
>
>
>


-- 
Yours Sincerely,
Jacky Chan

Re: Restrict Commit Files Types

Posted by Matt Sickler <cr...@gmail.com>.
The book: http://svnbook.red-bean.org  one of the later chapers has the
stuff on hooks


On 3/5/07, Jacky Chan <ja...@gmail.com> wrote:
>
> Dear Matt,
>
> Thank you very much for the reply.
> Yeap, I am start to take a look at it though, is there any good
> HOWTO/tutorial to quickly get start?
>
> 2007/3/6, Matt Sickler < crazyfordynamite@gmail.com>:
> >
> > svn:ignore is only precautionary - it in no way FORCES anything
> >
> > if you want to deny certain files from being committed you need a
> > pre-commit hook that checks for them
> >
> > On 3/5/07, Jacky Chan <ja...@gmail.com> wrote:
> > >
> > > Dears,
> > >
> > > I am running SVN with svnserve, and I am considering the approaches
> > > for setting up the restriction of committing a file.
> > > In my own experience, by setting up the properties of svn:ignore and
> > > the global-ignore in .subversion can achieve to goal in the way by setting
> > > up the ignore list.
> > > But it seems the ignore list resides in client side, that means user
> > > can modify the list and so as the properties to again commit the files that
> > > are set ignore before.
> > >
> > > I would like to ask is there any way to set the ignore list on the
> > > server side? and some other related but indirect way to set the list that
> > > can restrict user to not commit certain files.
> > >
> > > Thank you very much and I am looking forward to your reply.
> > >
> > > --
> > > Yours Sincerely,
> > > Jacky Chan
> >
> >
> >
>
>
> --
> Yours Sincerely,
> Jacky Chan

Re: Restrict Commit Files Types

Posted by Jacky Chan <ja...@gmail.com>.
Dear Matt,

Thank you very much for the reply.
Yeap, I am start to take a look at it though, is there any good
HOWTO/tutorial to quickly get start?

2007/3/6, Matt Sickler <cr...@gmail.com>:
>
> svn:ignore is only precautionary - it in no way FORCES anything
>
> if you want to deny certain files from being committed you need a
> pre-commit hook that checks for them
>
> On 3/5/07, Jacky Chan <ja...@gmail.com> wrote:
> >
> > Dears,
> >
> > I am running SVN with svnserve, and I am considering the approaches for
> > setting up the restriction of committing a file.
> > In my own experience, by setting up the properties of svn:ignore and the
> > global-ignore in .subversion can achieve to goal in the way by setting up
> > the ignore list.
> > But it seems the ignore list resides in client side, that means user can
> > modify the list and so as the properties to again commit the files that are
> > set ignore before.
> >
> > I would like to ask is there any way to set the ignore list on the
> > server side? and some other related but indirect way to set the list that
> > can restrict user to not commit certain files.
> >
> > Thank you very much and I am looking forward to your reply.
> >
> > --
> > Yours Sincerely,
> > Jacky Chan
>
>
>


-- 
Yours Sincerely,
Jacky Chan

Re: Restrict Commit Files Types

Posted by Matt Sickler <cr...@gmail.com>.
svn:ignore is only precautionary - it in no way FORCES anything

if you want to deny certain files from being committed you need a pre-commit
hook that checks for them

On 3/5/07, Jacky Chan <ja...@gmail.com> wrote:
>
> Dears,
>
> I am running SVN with svnserve, and I am considering the approaches for
> setting up the restriction of committing a file.
> In my own experience, by setting up the properties of svn:ignore and the
> global-ignore in .subversion can achieve to goal in the way by setting up
> the ignore list.
> But it seems the ignore list resides in client side, that means user can
> modify the list and so as the properties to again commit the files that are
> set ignore before.
>
> I would like to ask is there any way to set the ignore list on the server
> side? and some other related but indirect way to set the list that can
> restrict user to not commit certain files.
>
> Thank you very much and I am looking forward to your reply.
>
> --
> Yours Sincerely,
> Jacky Chan