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

Re: Forcing update of the $keywords$

From: Ryan Schmidt <subversion-2006q2_at_ryandesign.com>
Date: 2006-06-05 23:30:32 CEST

On Jun 5, 2006, at 21:18, Luc Mercier wrote:

> I'm using the keywords $Date$, $Rev$, etc. in some file. The
> problem I have is that these keywords are subsituted when on an
> update or a checkout, but not after a commit, resulting in the
> subsituted value to be not up to date. The problem is especially
> bothering if there's only one person working on a project, because
> in that case after the initial checkout the file will never be
> updated.
>
> So far, I have two workarounds :
> * After each commit, delete the file in the working copy and do an
> update... It works, but that's really annoying
> * Have two working copies, and each time you commit from one, you
> start working in the other one... That's not better.

I don't understand. You say the keywords are updated on update, but
not on commit? That's not what I see. With Subversion 1.3.2 on Mac OS
X, the keywords update when I commit:

$ svnadmin create repo
$ svn co file://`pwd`/repo wc
Checked out revision 0.
$ cd wc
$ echo '$Date$' > foo
$ echo '$Rev$' >> foo
$ svn add foo
A foo
$ svn ci -m ""
Adding foo
Transmitting file data .
Committed revision 1.
$ svn propset svn:keywords 'Date Rev' foo
property 'svn:keywords' set on 'foo'
$ cat foo
$Date$
$Rev$
$ svn ci -m ""
Sending foo

Committed revision 2.
$ cat foo
$Date: 2006-06-05 23:25:49 +0200 (Mon, 05 Jun 2006) $
$Rev: 2 $
$ echo 'bar' >> foo
$ cat foo
$Date: 2006-06-05 23:25:49 +0200 (Mon, 05 Jun 2006) $
$Rev: 2 $
bar
$ svn ci -m ""
Sending foo
Transmitting file data .
Committed revision 3.
$ cat foo
$Date: 2006-06-05 23:26:02 +0200 (Mon, 05 Jun 2006) $
$Rev: 3 $
bar
$

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Jun 5 23:31:37 2006

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.