简体   繁体   中英

How to force english date ouput in svn log?

I need svn log to show date information in English locale, despite I'm working on non-English Windows. Is there any way to force English? I've tried to set LANG=C and LANGUAGE=C but this does not help:

E:\work\>set lang
LANG=C
LANGUAGE=C

E:\work\>svn --version
svn, version 1.8.11-SlikSvn-1.8.11-X64 (SlikSvn/1.8.11) X64
   compiled Dec  9 2014, 13:44:31 on x86_64-microsoft-windows6.2.9200

Copyright (C) 2014 The Apache Software Foundation.
This software consists of contributions made by many people;
see the NOTICE file for more information.
Subversion is open source software, see http://subversion.apache.org/

The following repository access (RA) modules are available:

* ra_svn : Module for accessing a repository using the svn network protocol.
  - with Cyrus SASL authentication
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme
* ra_serf : Module for accessing a repository via WebDAV protocol using serf.
  - using serf 1.3.8
  - handles 'http' scheme
  - handles 'https' scheme


E:\work\>svn log -l1
------------------------------------------------------------------------
r3663 | bialix | 2015-04-03 14:06:04 +0300 (Пт, 03 апр 2015) | 1 line
...

As you can see in the last line I have date in Russian, I need it in English.

I don't want to use svn log --xml that's too much to what I need.

I don't think there is a simple and easy way to achieve what you need. These are the options:

  1. Use xml, like you mentioned, and then in PowerShell parse it and write the date using desired locale.

  2. Temporarily change global settings (change it once, then do your thing, then change it back). There is a blog with cscript example. There is also a Microsoft guide , where you would call something like control intl.cpl,, /f:"filename.xml" . Just have to figure out the format of this xml file.

  3. Replace 7 texts of days of the week and 12 texts of months of the year in the output. Maybe the best for your case is to do it in PowerShell.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM