2015-04-06 53 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中執行此操作。