You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Paul Campbell <pw...@u.washington.edu> on 2004/07/15 01:07:57 UTC
keyword substitution
Newbie but I searched archive and FAQ
I have been using $Id$ with CVS for a java project.
Just migrated to Subersion. ( only a few lumps )
It has been nice to see who/when the file was last updated.
I purchased ( and read ) the Subervsion book ( o'reilly )
Yes, I see on pg 151 where I can set a property on a specific file,
but I want the property for all files
svn propset svn:keywords "Id"
where the files are in different packages ( aka directories )
There must be a way to set this keyword globally, isn't there ?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: Keywords $LastChangedDate$ and $Id$ didn't work
Posted by Erik <e....@finmatica.com>.
Brad Rhoads wrote:
> But $LastChangedDate$ and $Id$ didn't work. Doesn't the auto-props apply to
> them? Do I have a typo? Something else?
remove the quotes.
you should have a line like this:
*.txt = svn:keywords=URL Rev Date Author
my 0.02€
Erik
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Keywords $LastChangedDate$ and $Id$ didn't work
Posted by Brad Rhoads <br...@zethcon.com>.
After following the recent threads, I finally see the relationship between
the config file and keyword substitution (and the global-ignores). The
config file only relates to the clients and should be kept in sync.
I made these changes to my config:
### Section for configuring miscelleneous Subversion options.
[miscellany]
### Set global-ignores to a set of whitespace-delimited globs
### which Subversion will ignore in its 'status' output.
global-ignores = *.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store *.exe
. . .
enable-auto-props = yes
. . .
[auto-props]
. . .
*.* = svn:keywords="LastChangedDate LastChangedRevision LastChangedBy
HeadURL Id"
I created a new file, added the keywords and did a commit. And it patly
worked. I ended up with:
/*
* $LastChangedDate$
* $LastChangedRevision: 40 $
* $LastChangedBy: brad $
* $HeadURL:
file:///D:/svnroot/synapse/websynapse/trunk/WEB-INF/classes/com/monolith/web
app/Constants_1.java $
* $Id$
*/
But $LastChangedDate$ and $Id$ didn't work. Doesn't the auto-props apply to
them? Do I have a typo? Something else?
I'm using 1.0.5, Win 2003 server, XP client (TortoiseSVN).
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: keyword substitution
Posted by Michael W Thelen <th...@cs.utah.edu>.
* Toby Johnson <to...@etjohnson.us> [2004-07-14 20:53]:
> >svn propset svn:keywords "Id"
> >
> >where the files are in different packages ( aka directories )
> >
> >There must be a way to set this keyword globally, isn't there ?
>
> Kinda but not really. You can use autoprops to have every committed file
> (or every file matching a file mask you specify) get the property
> attached, but autoprops have to be set on each client. There's no way to
> specify it server-side.
Additionally, auto-props only cause the property to be set on files or
directories as they are added to the repository. If you want svn:keywords to
be set on files that already exist in the repository, you'll have to set it
yourself for each one. (And unfortunately, as I just found out today, "svn
propset" does not take a URL, so you'll have to check the files out and use
"svn propset" in a working copy.)
-- Mike
--
Michael W. Thelen
Nothing astonishes men so much as common sense and plain dealing.
-- Ralph Waldo Emerson, "Essays"
Re: keyword substitution
Posted by Toby Johnson <to...@etjohnson.us>.
Paul Campbell wrote:
> svn propset svn:keywords "Id"
>
> where the files are in different packages ( aka directories )
>
> There must be a way to set this keyword globally, isn't there ?
Kinda but not really. You can use autoprops to have every committed file
(or every file matching a file mask you specify) get the property
attached, but autoprops have to be set on each client. There's no way to
specify it server-side.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org