用于列出两个代码分支中的文件的工具,按每个文件更改的程度排序

发布于 2024-10-13 04:29:47 字数 709 浏览 6 评论 0原文

我想概述我们项目的两个不同分支之间的变化。大多数 diff 工具(winmerge 等)都会递归地提供两个目录的并排列表,您可以在其中查看文件是否已更改、一侧丢失或相等,如下所示:

g

我寻求的是具有相同的视图,但在每个文件中添加一个表示“更改了多少”的值(例如,可以通过它来订购)。有人知道有什么工具可以提供类似的功能吗?我有兴趣看到,例如,10 个文件发生了很大的变化,而数百个文件可能只是有小的外观变化等。

如果没有,那么也许可以编写它,但首先应该定义“发生了多少变化”,是吗?这个概念已经存在了?否则,您会选择什么作为衡量它的方法:

  • 两个文件中文本的编辑距离(这将很容易编码)
  • 相同的算法差异工具检测到的更改的数量和大小使用
  • 任何其他工具吗?

当然,某些文件可能已被重命名...对于初学者来说,可能会忽略这些文件,或者如果授予对处理重命名的存储库(Hg 或 git)的访问权限,则可能可以找到在两个分支之间重命名的文件,并且将它们与其他的进行比较。

我已经看到这个问题但我不是在寻找东西这只适用于给定的语言。

I want to have an overview of the changes between two different branches of our project. Most of the diff tools (winmerge etc) provide a side-by-side listing of both dirs recussively, where you can see if the file is changed, missing in one side or equal, like this:

g

What I seeking is to have the same view, but adding a value that says 'how much has changed' in each file (and being able to order by it for example). Does somebody know of any tool that would provide something like that? I am interested in seeing that for example 10 files have heavily changed while hundreds maybe just have small cosmetic changes etc.

If there is none, then maybe it could be written, but first 'how much has changed' should have to be defined, does that concept already exist? Otherwise, what would you choose as a way to measure it:

  • levenshtein distance of the text in both files (that would be easy to code)
  • number and size of changes detected by the same algo diff tools use
  • any other?

Of course, some files might have been renamed...one might just ignore those for starters, or if given access to a repository that handles renames (Hg or git) probably it is possible to find what files were renamed between the two branches and compare them as the rest.

I have seen this question but I am not looking for something that just works in a given language.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一身骄傲 2024-10-20 04:29:47

AraxisMerge 提供每个文件中的差异数量,是的,您可以按该列排序:
替代文字
尽管它不是免费的,但它是我见过的最好的差异/合并工具。我在日常工作中使用它,并会推荐给大家。

AraxisMerge provides the number of differences in each file and yes, you can sort by that column:
alt text
Although it's not free, it's the best Diff/Merge tool I've ever seen. Using it in my daily work and would recommend it to everyone.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文