You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Rob Wilkerson <r....@gmail.com> on 2006/08/14 23:30:51 UTC

svn:keywords


Re: svn:keywords

Posted by Rob Wilkerson <r....@gmail.com>.
Aha, thank you.  I knew there had to be a way, but didn't recall that
from the book.

On 8/14/06, Hari Kodungallur <hk...@gmail.com> wrote:
>
>
> On 8/14/06, Rob Wilkerson <r....@gmail.com> wrote:
> > From what I can tell, it appears that the keywords property can only
> > be applied to individual files (not to projects/directories).  Is that
> > true?  Does that also mean that each time I add a new file I have to
> > explicitly make those keywords available to that file?
> >
> >
>
> You are right, you can not apply a svn:keywords on a directory so that it
> gets applied to all files within it. The svn:keywords has to be set on each
> file. But you can set the auto-props in the config file (on Unix/Linux this
> file is in ~/.subversion/config). This is for automatically setting the
> given properties on any added or imported files.
> http://svnbook.red-bean.com/en/1.1/ch07s02.html#svn-ch-7-sect-2.4
>
> rgds
> --
> -Hari Kodungallur
> SpikeSource Inc.
> http://developer.spikesource.com


-- 

Rob Wilkerson

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

Re: svn:keywords

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Aug 15, 2006, at 14:54, Rob Wilkerson wrote:

>>> The file you reference is in *my* home directory.  Presumably, then,
>>> setting autoprops in that file will only affect commits made by me.
>>> Is there a way to set those autoprops "globally"?
>>
>> Yes, it only affects your commits. No, you cannot set it globally.
>> What you can do is install a pre-commit hook which verifies incoming
>> commits and rejects any that do not meet your autoprops definitions.
>> The error message you print could direct people to a Subversion
>> config file that's already set up correctly, for example on a web
>> page somewhere. You'd have to write this script though.
>
> Ryan, your message left me wondering whether I really understand the
> use of svn:keywords or, perhaps, the autoprops setting.  I don't
> necessarily want to force developers to include any or all keywords,
> but I want Subversion to always updated files if the keywords are
> present.  I thought that, in order to do the latter, I had to
> explicitly tell svn to recognize certain keywords.  Is my
> understanding correct or am I horribly misguided?

Oh. Well if you don't want to require certain keywords on all files  
of a certain type, then you can skip the hook script.

The point of autoprops is also to cause certain properties (for  
example, keywords) to be applied automatically to all files matching  
a given regular expression (for example, all *.c files). So if you  
don't want keywords automatically on all files of a certain type, but  
rather on only specific files, then you can skip the autoprops too.

You can just set the svn:keywords property on the files where you  
want it, and any Subversion client will expand those keywords on  
checkout. (Keyword expansion happens client-side after checkout or  
update, not server-side.)




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

Re: svn:keywords

Posted by "Martin J. Stumpf" <mj...@jhu.edu>.
Rob Wilkerson wrote:
> Ryan, your message left me wondering whether I really understand the
> use of svn:keywords or, perhaps, the autoprops setting.  I don't
> necessarily want to force developers to include any or all keywords,
> but I want Subversion to always updated files if the keywords are
> present.  I thought that, in order to do the latter, I had to
> explicitly tell svn to recognize certain keywords.  Is my
> understanding correct or am I horribly misguided?
>

Rob,

If the svn:keywords property is set when you ci, svn will update the 
keywords in your working copy.
If you use the autoprops in your config file then everyfile that matches 
the pattern will automatically have the svn:keywords property set on it 
when you add it to the repo. The keyword is updated on co and update 
only on your local wc.

HTH,

-Martin

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

Re: svn:keywords

Posted by Rob Wilkerson <r....@gmail.com>.
Ryan, your message left me wondering whether I really understand the
use of svn:keywords or, perhaps, the autoprops setting.  I don't
necessarily want to force developers to include any or all keywords,
but I want Subversion to always updated files if the keywords are
present.  I thought that, in order to do the latter, I had to
explicitly tell svn to recognize certain keywords.  Is my
understanding correct or am I horribly misguided?

Thanks.

On 8/15/06, Ryan Schmidt <su...@ryandesign.com> wrote:
>
> On Aug 15, 2006, at 12:43, Rob Wilkerson wrote:
>
> > Thanks, Kevin.  I got essentially the same answer from Hari, but it
> > led to another question that I'll ask you as well:
> >
> > The file you reference is in *my* home directory.  Presumably, then,
> > setting autoprops in that file will only affect commits made by me.
> > Is there a way to set those autoprops "globally"?
>
> Yes, it only affects your commits. No, you cannot set it globally.
> What you can do is install a pre-commit hook which verifies incoming
> commits and rejects any that do not meet your autoprops definitions.
> The error message you print could direct people to a Subversion
> config file that's already set up correctly, for example on a web
> page somewhere. You'd have to write this script though.
>
>


-- 

Rob Wilkerson

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

Re: svn:keywords

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Aug 15, 2006, at 12:43, Rob Wilkerson wrote:

> Thanks, Kevin.  I got essentially the same answer from Hari, but it
> led to another question that I'll ask you as well:
>
> The file you reference is in *my* home directory.  Presumably, then,
> setting autoprops in that file will only affect commits made by me.
> Is there a way to set those autoprops "globally"?

Yes, it only affects your commits. No, you cannot set it globally.  
What you can do is install a pre-commit hook which verifies incoming  
commits and rejects any that do not meet your autoprops definitions.  
The error message you print could direct people to a Subversion  
config file that's already set up correctly, for example on a web  
page somewhere. You'd have to write this script though.

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

Re: svn:keywords

Posted by Rob Wilkerson <r....@gmail.com>.
Thanks, Kevin.  I got essentially the same answer from Hari, but it
led to another question that I'll ask you as well:

The file you reference is in *my* home directory.  Presumably, then,
setting autoprops in that file will only affect commits made by me.
Is there a way to set those autoprops "globally"?

On 8/14/06, Kevin Grover <ko...@yahoo.com> wrote:
> Yes, you have to add them by file.  However, wildcards work and you can get them automatically by file type using autoprops
>
>  Check out the docs
>
>  http://svnbook.red-bean.com/en/1.2/svn.advanced.props.html#svn.advanced.props.auto
>
>  Basically, you set this up in the config portion of your Subversion setup
>
>  Cheers
>
>  - ko
>
> ----- Original Message ----
> From: Rob Wilkerson <r....@gmail.com>
> To: Subversion List <us...@subversion.tigris.org>
> Sent: Monday, August 14, 2006 4:30:51 PM
> Subject: svn:keywords
>
> From what I can tell, it appears that the keywords property can only
> be applied to individual files (not to projects/directories).  Is that
> true?  Does that also mean that each time I add a new file I have to
> explicitly make those keywords available to that file?
>
> Thanks.
>
> --
>
> Rob Wilkerson
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>
>
>
>


-- 

Rob Wilkerson

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

Re: svn:keywords

Posted by Kevin Grover <ko...@yahoo.com>.
Yes, you have to add them by file.  However, wildcards work and you can get them automatically by file type using autoprops
 
 Check out the docs
 
 http://svnbook.red-bean.com/en/1.2/svn.advanced.props.html#svn.advanced.props.auto
 
 Basically, you set this up in the config portion of your Subversion setup
 
 Cheers
 
 - ko

----- Original Message ----
From: Rob Wilkerson <r....@gmail.com>
To: Subversion List <us...@subversion.tigris.org>
Sent: Monday, August 14, 2006 4:30:51 PM
Subject: svn:keywords