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

Re: LastChangedDate format problem in subversion

From: Jani Averbach <jaa_at_jaa.iki.fi>
Date: 2005-05-01 05:08:32 CEST

On 2005-04-30 11:40+0300, Pekka Niiranen wrote:
> Hi there,
>
> I am using $LastChangedDate keyword to automatically stamp
> my sourcefiles in repository like this:
>
> #!/usr/bin/python
> # $LastChangedDate: 2005-04-05 18:10:11 +0300 (ti, 05 huhti 2005) $
>
> The problem is that the source files must contain only USASCII strings but
> Window's Long Date Format gives month names in my natural language.
>
> How can I configure the $LastChangedDate format to either:
> - use english month names or
> - skip month name all together like:
> $LastChangedDate: 2005-04-05 18:10:11 +0300
> instead of
> $LastChangedDate: 2005-04-05 18:10:11 +0300 (ti, 05 huhti 2005)

I see two possible solution for your problem:

1) You wrap your svn command inside to windows bat-script, which will
   set language settings for that command so that it won't use native
   names.

2) With coming 1.2.x you could use fixed length keywords, so if
   you set the fixed length keyword field too short, then the rest of
   the field will be cut of.

  /* Check for fixed-length expansion.
   * The format of fixed length keyword and its data is
   * Unexpanded keyword: "$keyword:: $"
   * Expanded keyword: "$keyword:: value $"
   * Expanded kw with filling: "$keyword:: value $"
   * Truncated keyword: "$keyword:: longval#$"
   */

Like that:
$LastChangedDate:: 2005-04-05 18:10:11 +0300 #$

BR, Jani

P.S. Oh, I forgot to mention the third option:
3) You will not commit anything during kesäkuu or heinäkuu. =)

-- 
Jani Averbach
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sun May 1 05:10:06 2005

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.