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

Re: CVS $Log$ equivalent in Subversion?

From: Bob Bradley <bob_at_chaoticsoftware.com>
Date: 2004-03-09 22:57:19 CET

On 3/9/04 7:53 AM, "C. Michael Pilato" <cmpilato@collab.net> wrote:
 
> IIRC, $Log$ has been decreed evil because of the recursion problem
> that occurs when you actually use the character sequence "$Log$" in a
> log message, as in "I added the $Log$ keyword to the top of this
> file."

It doesn't seem unreasonable to me to require the user to not use $Log$ in
log messages if $Log$ is being used. There are also other ways to solve this
more cleanly than the way CVS does it. For example, you could have something
like $LogEnd$ that stops $Log$ expansion after it is found and doesn't do
$Log$ expansion inside a $Log$ .. $LogEnd$ block. $LogEnd$ could have a
similar recursion effect, but it would tend to be benign because it would
just stop expanding earlier than it should, which is most likely fine. An
even simpler way (just off the top of my head) would be something like
"$Log-Once$ (probably needs a better name) to stop expanding after it.

Something more general that I've also found useful is something like
$EndKeywords$. I added this to CVS (but I never raw a response to my patch)
so scripts that parsed files with keywords (and therefore had keywords as
part of their content) didn't get expanded after $EndKeywords$ was found.
This allowed me to have a header at the top with keywords expanded while the
text below was protected from expansion.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Mar 9 23:05:06 2004

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