2015-04-06 54 views
3

尽管我在非英文版Windows上工作,但我需要svn日志来显示英文语言环境中的日期信息。有什么办法可以强制英文吗?我试着设置LANG = C和LANGUAGE = C但这并不能帮助:如何在svn日志中强制英文日期输出?

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 
... 

正如你可以在最后一行我在俄罗斯的日期看,我需要它的英文。

我不想使用svn log --xml这对我所需要的太多了。

回答

0

我不认为有一个简单而简单的方法来实现你所需要的。这些选项:

  1. 使用XML,就像你提到的,然后再在PowerShell中分析它,并使用所需的语言写上日期。

  2. 暂时改变全局设置(改变一次,然后做你的事,然后改回它)。有一个blogcscript的例子。还有一个Microsoft guide,你会打电话给control intl.cpl,, /f:"filename.xml"。只需要弄清楚这个xml文件的格式。

  3. Replace 7个文本的一周中的日期和12个月的文本在输出中。也许最适合您的情况是在PowerShell中执行此操作。