How do I escape a subversion keyword?
I'm working on some software (spamassassin) that uses the subversion keyword "$LastChangedDate$". In the same file that it's used, I want that string to appear unmodified - not expanded by subversion, exactly as "$LastChangedDate$" instead of something like "$LastChangedDate: 2010-03-30 08:02:18 -0400 (Tue, 30 Mar 2010) $" Because I want to check for a case where svn keywords aren't getting expanded. Something like (perl): if ('$LastChangedDate$' eq '$LastChangedDate$') But with one of them getting expanded, and the other not. I think it would work to do something like: if ('$LastChangedDate$' eq '$LastChan'.'gedDate$') But I'd prefer to escape the keyword instead. Maybe something like \$LastChangedDate$ ? The reason is that the Ubuntu daily build system on launchpad.net doesn't support subversion keyword expansion: https://bugs.launchpad.net/launchpad/+bug/780916 SpamAssassin bug: https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6605 -- "Go forth, and be excellent to one another." - http://www.jhuger.com/fredski.php http://www.ChaosReigns.com
Re: How do I escape a subversion keyword?
On 05/27, Bob Archer wrote: > I'm confused about what you are asking. Are you saying you don't want > subversion to expand the keywords? If so, then remove them from the > svn:keywords property. Any keywords not in the property are not expanded. I want the expanded keyword, and the *un-expanded* keyword to both exist in the same file. So after expansion, it would look like: if ('$LastChangedDate$' eq '$LastChangedDate: 2010-03-30 08:02:18 -0400 (Tue, 30 Mar 2010) $') And when expansion doesn't happen (with launchpad build recipes), it'll look like: if ('$LastChangedDate$' eq '$LastChangedDate$') -- "One armed student or teacher could have stopped the killer, but all died obeying the rules." - http://www.olegvolk.net/gallery/technology/arms/yourkid0181.jpg.html http://www.ChaosReigns.com