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

Problems with "LastChangedRevision" keyword

From: Pete Gonzalez <pgonzalez_at_bluel.com>
Date: 2005-01-19 05:02:40 CET

In the about box for my application, I would like to display the
Subversion revision number used to build the project.

Consider this example file:

        //
        // Revision.cpp
        //
        // $LastChangedDate: 2002-07-22 21:42:37 -0700 (Mon, 22 Jul 2002) $
        //
        
        const char *REVISION = "$LastChangedRevision: 144 $";

If I set the "svn:keywords" property for Revision.cpp, then the date and
revision text will be automatically updated whenever changes are committed
to the repository. Unfortunately, the keyword expansions only apply to
the file Revision.cpp, not the entire project. Thus, Revision.cpp is only
updated when there have been "svn commit" operations for Revision.cpp.

In Subversion terminology, my "project revision" is >= the Revision.cpp
revision and <= the repository's HEAD revision. It is not stored
explicitly, but can be calculated as the maximum of the individual file
revisions in a particular folder. Thus, in order to calculate the
"project revision", we need to know the project's URL (i.e. the URL of
some parent directory for Revision.cpp).

To support this feature, I therefore need to create a file property
for Revision.cpp (e.g. "svn:projecturl"), in a addition to the new
keyword (e.g. "$ProjectRevision$").

Before I start, I have two questions:

1. This feature seems very obvious; has anyone else requested it? Is
somebody already working on it?

2. The existing svn:keywords seem to be expanded only during "commit"
operations (i.e. not during "update" operations), whereas $ProjectRevision$
will need to be expanded whenever an "Update" occurs. Does this mean
that I need to implement the feature in the client rather than the
Subversion server?

Thanks,
-Pete

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Jan 19 05:05:30 2005

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