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

missing feature in Subversion: $Format keyword a la PRCS

From: Basile STARYNKEVITCH <basile_at_starynkevitch.net>
Date: 2004-12-23 18:28:15 CET

Dear All,

I miss a feature in svn which is available in PRCS. The Format
keyword. From PRCS documentation on
http://voxel.dl.sourceforge.net/sourceforge/prcs/prcs_doc.html or
http://ovh.dl.sourceforge.net/sourceforge/prcs/prcs_doc.html (or other
Sourceforge mirrors).

    Sometimes, you want keyword replacement data to appear without the
    leading $keyword: and trailing `$'. A formatted keyword instance
    allows this. An appearance in your file of

    $Format: "string"$
    string

    will cause prcs checkin to replace the next line of the source file
    (i.e., the line after the second `$') with string, after first making
    modified keyword substitutions in it. Specifically, each instance of
    $keyword$ in string (for which keyword is one of the recognized
    keywords) is replaced by just the data that would be placed to the
    right of the `:' in a simple keyword instance. The Format instance
    itself is not altered--only the subsequent line. For example, if a
    file in a project contains

    /* $Format: "static char* version = \"$ProjectVersion$\";"$ */
    static char* version = "x.x";

    then the version of the file checked in for version 1.2 of the project
    will contain

    /* $Format: "static char* version = \"$ProjectVersion$\";"$ */
    static char* version = "1.2";

    The format string may not contain newlines. It may contain quotation
    marks if they are stropped with a backslash, as in the example
    above. In general, the backslash quotes the succeeding character. Any
    keyword instances on a list after a Format instance are ignored (that
    is, they are left unchanged by keyword substitution). Any nested
    instance of Format is also left unchanged.

I find this feature extremely useful, for usage like above (or eg in
Makefiles, where some make targets depends upon the version, or the
date, etc....)

Do other people miss such a feature? Any clues on where it should be
implemented in subversion sources?

I might perhaps propose a patch for this, if there are some chances
it could be accepted. I don't know very well about Subversion social
developmment process. Could such a feature be included? How are
enhancement included in SVN (this is more a social question than a
technical one...).

Regards.

-- 
Basile STARYNKEVITCH         http://starynkevitch.net/Basile/ 
email: basile<at>starynkevitch<dot>net 
aliases: basile<at>tunes<dot>org = bstarynk<at>nerim<dot>net
8, rue de la Fa´encerie, 92340 Bourg La Reine, France
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Dec 23 18:29:29 2004

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

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