You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Rex Zhen <re...@yahoo.com> on 2007/08/27 17:45:31 UTC

how to set keywords property as default whenever file is created

Is there any way i can set the default property to a project/folder  
in svn repository?  I can set the keywords property to folder or  
individual file, but how can I make the  keywords property set to all  
files there whenever the files or folder are created?

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

Re: how to set keywords property as default whenever file is created

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Aug 28, 2007, at 13:24, Rex Zhen wrote:

> On Aug 27, 2007, at 11:49 AM, Eric Hanchrow wrote:
>
>> Rex Zhen writes:
>>
>>> Is there any way i can set the default property to a
>>> project/folder in svn repository?  I can set the keywords
>>> property to folder or individual file, but how can I make the
>>> keywords property set to all files there whenever the files
>>> or folder are created?
>>
>> See
>> http://svnbook.red-bean.com/en/1.4/ 
>> svn.advanced.confarea.html#svn.advanced.confarea.opts.config,
>> towards the bottom.
>
> Thank you. But how to make the configuration active? I edit the / 
> etc/subversion/config file. I ran svn on apache.

Not /etc/subversion/config. ~/.subversion/config. It is a per-user  
setting.




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

Re: how to set keywords property as default whenever file is created

Posted by Rex Zhen <re...@yahoo.com>.
Thank you. It works.


On Aug 28, 2007, at 1:04 PM, Andy Levy wrote:

> On 8/28/07, Andy Levy <an...@gmail.com> wrote:
>> On 8/28/07, Rex Zhen <re...@yahoo.com> wrote:
>>> I changed the config file.
>>> 1. comment out the enable-auto-props=yes
>>> 2. under [auto-props]
>>>      *.pl = svn:keywords = Id
>>>
>>> when I go back check the svn file, it did not work.
>>
>> Because auto-props only apply when items are *added* via svn add.  
>> They
>> aren't retroactive.
>
> Correction - or upon import (svn import).
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>

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

Re: how to set keywords property as default whenever file is created

Posted by Rex Zhen <re...@yahoo.com>.
OK,

It is working for tortoiseSVN now. the config file is located in  
application data/subversion.
But it seams did not work for subclipse, i did not find the config  
file for subclipse.
On Aug 28, 2007, at 1:04 PM, Andy Levy wrote:

> On 8/28/07, Andy Levy <an...@gmail.com> wrote:
>> On 8/28/07, Rex Zhen <re...@yahoo.com> wrote:
>>> I changed the config file.
>>> 1. comment out the enable-auto-props=yes
>>> 2. under [auto-props]
>>>      *.pl = svn:keywords = Id
>>>
>>> when I go back check the svn file, it did not work.
>>
>> Because auto-props only apply when items are *added* via svn add.  
>> They
>> aren't retroactive.
>
> Correction - or upon import (svn import).
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>

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

Re: how to set keywords property as default whenever file is created

Posted by Andy Levy <an...@gmail.com>.
On 8/28/07, Andy Levy <an...@gmail.com> wrote:
> On 8/28/07, Rex Zhen <re...@yahoo.com> wrote:
> > I changed the config file.
> > 1. comment out the enable-auto-props=yes
> > 2. under [auto-props]
> >      *.pl = svn:keywords = Id
> >
> > when I go back check the svn file, it did not work.
>
> Because auto-props only apply when items are *added* via svn add. They
> aren't retroactive.

Correction - or upon import (svn import).

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

Re: how to set keywords property as default whenever file is created

Posted by Andy Levy <an...@gmail.com>.
On 8/28/07, Rex Zhen <re...@yahoo.com> wrote:
> I changed the config file.
> 1. comment out the enable-auto-props=yes
> 2. under [auto-props]
>      *.pl = svn:keywords = Id
>
> when I go back check the svn file, it did not work.

Because auto-props only apply when items are *added* via svn add. They
aren't retroactive.

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

Re: how to set keywords property as default whenever file is created

Posted by Rex Zhen <re...@yahoo.com>.
I changed the config file.
1. comment out the enable-auto-props=yes
2. under [auto-props]
     *.pl = svn:keywords = Id

when I go back check the svn file, it did not work.


On Aug 28, 2007, at 11:53 AM, Andy Levy wrote:

> On 8/28/07, Rex Zhen <re...@yahoo.com> wrote:
>>
>> Thank you for your quick response.
>> All of the users here use eclipse and tortoiseSVN. How can I make
>> this happen to all users.
>
> Update everyone's %APPDATA%\Subversion\config file to take care of
> TSVN (and the Win32 svn command-line client). Eclipse by default uses
> the same, I believe (assuming they're using Subclipse), but the user
> is able to change this. For *NIX users, it'll be ~/.subversion/config
>
> In all cases, the user can go back and change that configuration after
> you've "fixed" it for them.
>
> Which is why I stated in my original reply that if you need to enforce
> this strictly, you need to install a pre-commit hook to reject any
> commit which doesn't meet your requirements for properties.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>

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

Re: how to set keywords property as default whenever file is created

Posted by Andy Levy <an...@gmail.com>.
On 8/28/07, Rex Zhen <re...@yahoo.com> wrote:
>
> Thank you for your quick response.
> All of the users here use eclipse and tortoiseSVN. How can I make
> this happen to all users.

Update everyone's %APPDATA%\Subversion\config file to take care of
TSVN (and the Win32 svn command-line client). Eclipse by default uses
the same, I believe (assuming they're using Subclipse), but the user
is able to change this. For *NIX users, it'll be ~/.subversion/config

In all cases, the user can go back and change that configuration after
you've "fixed" it for them.

Which is why I stated in my original reply that if you need to enforce
this strictly, you need to install a pre-commit hook to reject any
commit which doesn't meet your requirements for properties.

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

Re: how to set keywords property as default whenever file is created

Posted by Rex Zhen <re...@yahoo.com>.
Thank you for your quick response.
All of the users here use eclipse and tortoiseSVN. How can I make  
this happen to all users.

On Aug 28, 2007, at 11:33 AM, Andy Levy wrote:

> On 8/28/07, Rex Zhen <re...@yahoo.com> wrote:
>> Thank you. But how to make the configuration active? I edit the /etc/
>> subversion/config file. I ran svn on apache.
>
> That will only affect users who don't already have a
> ~/.subversion/config (Subversion will copy that file and use it for
> the basis of the new user's own config). To make it "active" for users
> who have already been using Subversion, you need to add it to their
> .subversion/config file.
>
> Your Subversion server choice is irrelevant, as this is a *client- 
> side* setting.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>

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

Re: how to set keywords property as default whenever file is created

Posted by Andy Levy <an...@gmail.com>.
On 8/28/07, Rex Zhen <re...@yahoo.com> wrote:
> Thank you. But how to make the configuration active? I edit the /etc/
> subversion/config file. I ran svn on apache.

That will only affect users who don't already have a
~/.subversion/config (Subversion will copy that file and use it for
the basis of the new user's own config). To make it "active" for users
who have already been using Subversion, you need to add it to their
.subversion/config file.

Your Subversion server choice is irrelevant, as this is a *client-side* setting.

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

Re: how to set keywords property as default whenever file is created

Posted by Rex Zhen <re...@yahoo.com>.
Thank you. But how to make the configuration active? I edit the /etc/ 
subversion/config file. I ran svn on apache.


On Aug 27, 2007, at 11:49 AM, Eric Hanchrow wrote:

>>>>>> "Rex" == Rex Zhen <re...@yahoo.com> writes:
>
>     Rex> Is there any way i can set the default property to a
>     Rex> project/folder in svn repository?  I can set the keywords
>     Rex> property to folder or individual file, but how can I make the
>     Rex> keywords property set to all files there whenever the files
>     Rex> or folder are created?
>
> See
> http://svnbook.red-bean.com/en/1.4/ 
> svn.advanced.confarea.html#svn.advanced.confarea.opts.config,
> towards the bottom.
> -- 
> Garbage collection, introduced by Lisp in about 1960, is now
> widely considered to be a good thing.
>         -- Paul Graham
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>

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

Re: how to set keywords property as default whenever file is created

Posted by Eric Hanchrow <of...@blarg.net>.
>>>>> "Rex" == Rex Zhen <re...@yahoo.com> writes:

    Rex> Is there any way i can set the default property to a
    Rex> project/folder in svn repository?  I can set the keywords
    Rex> property to folder or individual file, but how can I make the
    Rex> keywords property set to all files there whenever the files
    Rex> or folder are created?

See
http://svnbook.red-bean.com/en/1.4/svn.advanced.confarea.html#svn.advanced.confarea.opts.config,
towards the bottom.
-- 
Garbage collection, introduced by Lisp in about 1960, is now
widely considered to be a good thing.
        -- Paul Graham

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

Re: how to set keywords property as default whenever file is created

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Aug 28, 2007, at 13:26, Rex Zhen wrote:

> On Aug 28, 2007, at 12:00 AM, Ryan Schmidt wrote:
>
>> On Aug 27, 2007, at 12:56, Andy Levy wrote:
>>
>>> On 8/27/07, Rex Zhen wrote:
>>>
>>>> Is there any way i can set the default property to a project/folder
>>>> in svn repository?  I can set the keywords property to folder or
>>>> individual file, but how can I make the  keywords property set  
>>>> to all
>>>> files there whenever the files or folder are created?
>>>
>>> http://svnbook.red-bean.com/en/1.4/ 
>>> svn.advanced.props.html#svn.advanced.props.auto
>>>
>>> Note that this is a client-side setting and therefore if one client
>>> isn't configured with these settings, they won't be applied to adds
>>> performed by that client; if you need to enforce this across your
>>> repository, install a pre-commit hook to verify that the required
>>> property values have been set.
>>
>> Note also that auto-props are for files only, and cannot be used  
>> on directories.
>>
>> http://subversion.tigris.org/issues/show_bug.cgi?id=1989
>
> how if i set the property to *.*. does this work?

The text of the issue says "The auto-props config doesn't affect  
directories, only files." You're welcome to experiment and see if you  
can make it work somehow, but I'm led to believe that it will not work.

The issue does include a patch, however, to implement this feature.

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

Re: how to set keywords property as default whenever file is created

Posted by Rex Zhen <re...@yahoo.com>.
how if i set the property to *.*. does this work?


On Aug 28, 2007, at 12:00 AM, Ryan Schmidt wrote:

> On Aug 27, 2007, at 12:56, Andy Levy wrote:
>
>> On 8/27/07, Rex Zhen wrote:
>>
>>> Is there any way i can set the default property to a project/folder
>>> in svn repository?  I can set the keywords property to folder or
>>> individual file, but how can I make the  keywords property set to  
>>> all
>>> files there whenever the files or folder are created?
>>
>> http://svnbook.red-bean.com/en/1.4/ 
>> svn.advanced.props.html#svn.advanced.props.auto
>>
>> Note that this is a client-side setting and therefore if one client
>> isn't configured with these settings, they won't be applied to adds
>> performed by that client; if you need to enforce this across your
>> repository, install a pre-commit hook to verify that the required
>> property values have been set.
>
> Note also that auto-props are for files only, and cannot be used on  
> directories.
>
> http://subversion.tigris.org/issues/show_bug.cgi?id=1989
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>

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

Re: how to set keywords property as default whenever file is created

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Aug 27, 2007, at 12:56, Andy Levy wrote:

> On 8/27/07, Rex Zhen wrote:
>
>> Is there any way i can set the default property to a project/folder
>> in svn repository?  I can set the keywords property to folder or
>> individual file, but how can I make the  keywords property set to all
>> files there whenever the files or folder are created?
>
> http://svnbook.red-bean.com/en/1.4/ 
> svn.advanced.props.html#svn.advanced.props.auto
>
> Note that this is a client-side setting and therefore if one client
> isn't configured with these settings, they won't be applied to adds
> performed by that client; if you need to enforce this across your
> repository, install a pre-commit hook to verify that the required
> property values have been set.

Note also that auto-props are for files only, and cannot be used on  
directories.

http://subversion.tigris.org/issues/show_bug.cgi?id=1989

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

Re: how to set keywords property as default whenever file is created

Posted by Andy Levy <an...@gmail.com>.
On 8/27/07, Rex Zhen <re...@yahoo.com> wrote:
> Is there any way i can set the default property to a project/folder
> in svn repository?  I can set the keywords property to folder or
> individual file, but how can I make the  keywords property set to all
> files there whenever the files or folder are created?

http://svnbook.red-bean.com/en/1.4/svn.advanced.props.html#svn.advanced.props.auto

Note that this is a client-side setting and therefore if one client
isn't configured with these settings, they won't be applied to adds
performed by that client; if you need to enforce this across your
repository, install a pre-commit hook to verify that the required
property values have been set.

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