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

Re: How do I escape a subversion keyword?

From: Andreas Krey <a.krey_at_gmx.de>
Date: Fri, 27 May 2011 20:11:47 +0200

On Fri, 27 May 2011 13:27:36 +0000, darxus_at_chaosreigns.com wrote:
> 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.

Doesn't work. svn either expands them all, or none. The only way to
get selective is to use some quoting that does not affect the target
language's perception of the string but makes it not look like $Keyword$
to svn.

I don't know if perl likes

  if ('$LastChangedDate\$' eq '$LastChangedDate$')

or

  if ('$LastChangedDate\044' eq '$LastChangedDate$')

is legal in perl but anyway this specific check is equivalent to (Ruby)

  if '$LastChangedDate$' =~ /:/

(check whether the string contains a colon).

Or, to answer the subject line: As by the escaping rules of your content language.

Andreas

-- 
"Totally trivial. Famous last words."
From: Linus Torvalds <torvalds@*.org>
Date: Fri, 22 Jan 2010 07:29:21 -0800
Received on 2011-05-27 20:23:19 CEST

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

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