【问题标题】:How to get Svn Changed file contents如何获取 Svn 更改的文件内容
【发布时间】:2012-05-08 07:05:04
【问题描述】:

我使用了以下命令

svn diff D:\QATV2Demo -r 12414:12416 

这给了我以下结果文本文件

索引:D:/QATV2Demo/Main.msbuild

 ===================================================================

--- D:/QATV2Demo/Main.msbuild   (revision 12414)

+++ D:/QATV2Demo/Main.msbuild   (revision 12416)

@@ -39,7 +39,7 @@

 AssemblyFile="$(ToolsBinPath)\MSBuild.Community.Tasks.dll" />
<PropertyGroup>
-    <FxCop_CriticalErrors>10</FxCop_CriticalErrors>
+    <FxCop_CriticalErrors>0</FxCop_CriticalErrors>
<FxCop_Errors>0</FxCop_Errors>
  <FxCop_CriticalWarnings>0</FxCop_CriticalWarnings>
   <FxCop_Warnings>0</FxCop_Warnings>     


Index: D:/QATV2Demo/QATV2Demo/QATConstant.cs
===================================================================
--- D:/QATV2Demo/QATV2Demo/QATConstant.cs       (revision 12414)
+++ D:/QATV2Demo/QATV2Demo/QATConstant.cs       (revision 12416)
@@ -9,7 +9,7 @@
 {
     public static readonly string PAGE_DATA_DROP_DOWN_MODE = "D";
     public static readonly string PAGE_DATA_GRID_MODE = "G";
-        public static readonly string REPORT = "Report";
+        public static readonly string REPORT = "Report1";
    public static readonly string ITEM_COUNT = "ItemCount";
 }
 }    

现在我需要提取那些显示实际内容差异的 - 和 + 行。我怎么能做到这一点有没有任何命令给我这个 XML 格式的结果,以便我可以通过 xslt 解析它。

提前致谢。

【问题讨论】:

  • 我认为您必须编写自己的脚本才能做到这一点。

标签: svn xslt xml-parsing cruisecontrol.net


【解决方案1】:

svn diff 有一个 --xml 标志用于在 xml 中输出。然后,您可以将 xml 合并到 Cruisecontrol 构建日志中,并使用 xsl 对其进行转换。当您需要差异的存储库与 Cruisecontrol 项目的源代码控制断开连接时,这很有用。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-05-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-02-05
    • 2020-07-04
    • 2012-09-22
    相关资源
    最近更新 更多