[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Keyword Substitution Question

From: B. Smith-Mannschott <benpsm_at_gmail.com>
Date: 2007-01-16 15:49:03 CET

On Jan 16, 2007, at 15:24, Doug Tanner wrote:

> We are moving from CVS, where we already use keyword substitution,
> to SVN and I have found the following command which should ‘turn
> on’ keyword substitution for our SVN repo. After running this
> command, will I need to rerun it on any files that are created in
> the repo or will it automatically ‘turn on’ keyword substitution
> since I ran it for the entire repo??
>
> find . \( -name '.svn' -prune \) -o -name '*.*' -exec svn propset
> svn:keywords " Id " {} \;
This sets the svn:keywords property to " Id " on all files found in
your working copy with names containing at least one period. This has
the effect of turning on keyword expansion for the keyword "Id" for
those files.

(Are you sure you want to turn on keyword expansion for potentially
*ever* file? Are you certain you haven't got any binary files that
might be damaged by spurious keyword expansion?)

There's a better way to handle newly added files than rerunning the
script. You can use svn's auto-props.

See also <http://svn.haxx.se/users/archive-2004-03/0213.shtml>,
condensed below.

Marcus Vinicius Ferreira <marcus_ferreira@yahoo.com> wrote:

> I would like to have an automatic set of the keywords
> $Id$ and $Author$ on my repository files -- much like
> what CVS does by nature.
>
> Modifying my ~/.subversion/config with these settings has no effect:
>
> ______________________________________________________________
>
> enable-auto-props = yes
>
> [auto-props]
> *.c = svn:eol-style=native;svn:keywords="Id Author"

"C. Michael Pilato" <cmpilato@collab.net> wrote:

> Lose the quotation marks. Also, understand that this will only effect
> newly added or imported *.c files -- not ones already in your tree.

// ben

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Jan 16 15:50:01 2007

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.