5

我有一个代码目录结构,它是这样的:

  modudle1
    trunk
      pom.xml
    branches
      1.1
        pom.xml
  modudle2
    trunk
      pom.xml
      submodule-2.1
        pom.xml
      submodule-2.2
        pom.xml
    branches
      1.1
        pom.xml
        submodule-2.1
          pom.xml
        submodule-2.2
          pom.xml

我需要将主干文件夹中的 pom.xml 文件与分支/1.1 中的文件进行比较:

  modudle1\trunk\pom.xml 
  modudle1\branches\1.1\pom.xml 

  modudle2\trunk\pom.xml
  modudle2\branches\1.1\pom.xml

  modudle2\trunk\submodule-2.1\pom.xml
  modudle2\branches\1.1\submodule-2.1\pom.xml

  modudle2\trunk\submodule-2.2\pom.xml
  modudle2\branches\1.1\submodule-2.2\pom.xml

有哪些解决方案可以做到这一点?是否有与 WinMerge 一起使用的解决方案,我可以在其中提供一个文件列表进行比较?也欢迎其他建议和工具。

4

2 回答 2

3

Total CommanderSynchronize Dirs命令(在命令菜单中),它允许您递归地比较 2 个文件夹并查看有什么不同(哪些文件在一个目录中而不在另一个目录中,哪些文件已更改)。

不幸的是,您无法使用此比较的结果生成“全局差异”文件(或者如果可以,我还没有找到方法)。

试一试,告诉我这是否是你要找的。

于 2010-04-29T08:32:03.443 回答
0

I believe the simplest way would be to script it, in order to pass to WinMerge:

  • one fixed file
  • one file found by the script (which is essentially a 'find . -name "pom.xml"' in the right paths.

In short, I don't know about a diff tool taking one file, and a list of files to compare that one file to.

于 2010-04-29T07:37:38.797 回答