SVN keyword expansion--replace once?

37 Views Asked by At

Svn can replace certain keywords with expanded info, like $Rev$ to $Rev: 123$.

But the next time the document is changed and submitted, this replacement will get replaced once more, to the rev of the second submit.

Is it possible to have "write-once" expansion without having to write custom submit hook scripts?

This is for a list of info attached to revisions, think "like a changelog"

$Rev$: Created Info file

would become

$Rev: 1$ Created Info file

then

$Rev: 1$ Created Info file
$Rev$ Info for this revision

would become

$Rev: 1$ Created Info file
$Rev: 2$ Info for this revision

... etc.

If I understand the docs correctly, it would become

$Rev: 2$ Created Info file
$Rev: 2$ Info for this revision

instead, which of course isn't what I want.

1

There are 1 best solutions below

1
On

As indicated by @royalTS in comments, what you want to do is not possible without any work from your side (for example an additional script removing the $...). As long as the property svn:keyword is set, the specified keywords will be all replaced.

As indicated by @alroc in comments, it sounds like you're trying to do something akin to CVS's $Log$, which is not going to be implemented in Subversion as explained clearly in https://subversion.apache.org/faq.html#log-in-source.

Thanks to @royalTS and @alroc.