On Jan 24, 2010, at 07:54, Johan Hogdahl wrote:

> Hello.
> I'm new to subversion after using CVS and RCS for a long time.
> I have just done a conversion of our code base to subversion.
> Now i got into a problem, the propset keywords Date fills in the Date in a 
> complete other way then
> CVS did. And cause many of our development machines is configured with 
> Swedish language,
> some days of week will get Swedish (iso-8859-1) chars, which can not be 
> handled by some compilers. Is there any way to use propset without the part 
> in (..), Its a very useless part anyway.
> Is there any configuration file, command or such, to change the format.

The only way I know to influence the way the Date keyword expands is to set the 
LANG (or LC_ALL or LC_TIME) environment variable to the locale you want to use 
for the date format, at the time the keyword is expanded by the client (i.e. at 
the time you issue the "svn ci" or "svn up" command). Setting LANG or LC_ALL 
will influence all localizable settings, including informational and error 
messages; if you don't want to change the locale of those, set just LC_TIME to 
affect just date and time formats. You could pick a locale name like 
"en_US.UTF-8" (or whatever it's called on your system) or just use the "C" 
locale which pretty assuredly won't contain any weird characters that will 
confuse your compiler. Example from my Mac OS X system:


$ LANG=sv_SE.UTF-8
$ svnadmin create repo
$ svn co file://`pwd`/repo wc
Checkade ut revision 0.
$ cd wc
$ echo '$Date$' > file
$ svn add file
A         file
$ svn propset svn:keywords Date file
satte egenskapen "svn:keywords" på "file"
$ svn ci -m "x"
Lägger till         file
Skickar filinnehåll .
Arkiverade revision 1.
$ cat file
$Date: 2010-01-24 16:21:02 -0600 (Sön, 24 Jan 2010) $
$ rm file
$ LC_TIME=C svn up
Återskapade "file"
Är på revision 1.
$ cat file
$Date: 2010-01-24 16:21:02 -0600 (Sun, 24 Jan 2010) $
$ rm file
$ LANG=C svn up
Restored 'file'
At revision 1.
$ cat file
$Date: 2010-01-24 16:21:02 -0600 (Sun, 24 Jan 2010) $
$ 



Reply via email to