是否存在比较函数而不是行号的合并工具?

发布于 2024-12-28 17:31:33 字数 100 浏览 0 评论 0原文

我正在使用 kdiff3,但我最近遇到了一个问题,即重新组织具有通用功能的方法(我所有的聚会、我所有的帖子在一起、验证等)最终导致我感到困惑用记事本手工完成所有事情。免费或付费并不重要。

I'm using kdiff3 but as I've recently come across the issue where reorganizing my methods that have common functionality (all my gets together, all my posts together, validation, etc.) ends up confusing it to the point where I'm doing everything by hand with notepad. Free or pay for doesn't really matter.

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

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

发布评论

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

评论(2

绝不放开 2025-01-04 17:31:33

我们的Smart Differencer工具根据代码结构而不是行来比较代码。它们使用真实的语言解析器来获取结构,因此它们独立于格式、注释、不同格式但相同的文字等。更改以概念编辑的形式报告(移动、复制、删除、重命名标识符)块)在语言元素(文字、变量、表达式、语句、块、函数...)上。提供多种语言的版本。

如果你将一个完整的方法移动到某个地方,它会告诉你你移动了这个方法,而不是你在这里删除了 27 行,并在那里插入了 27 行(可能相同,也可能不同)。

它不太明白有时甚至声明的顺序也不重要。在我们的待办事项清单中。

目前它也没有集成到合并工具中;只是做差异。也在我们的待办事项清单中。

Our Smart Differencer tools compare code based on code structure, not lines. They use real language parsers to pick up the structure, so they are independent of formatting, comments, different-format but identical literals, etc. Changes are reported in terms to conceptual edits (move, copy, delete, rename-identifier-in-block) on language elements (literals, variables, expressions, statements, blocks, functions, ...). Versions for many langauges available.

If you move a full method somewhere, it will tell you you moved the method, not that you deleted 27 lines here, and inserted 27 lines (which might or might not be the same) over there.

It doesn't quite understand that sometimes even the order of declarations isn't important. In our to-do list.

Nor is it presently integrated into a merge tool; just does diffs. Also in our to-do list.

浪推晚风 2025-01-04 17:31:33

暂时没有。我听说要开始规划新的 diff,它通过逻辑块而不是字符串进行操作,但它处于谣言的水平

在当前状态下,我只能看到一个选择作为最佳方法(并且它是仅限 Windows 的解决方案):CompareIt! 作为 diif-tools - 它可以检测(在某种程度上)并显示文件内的“移动块”并且最仔细地处理“删除块”+“在旧字符串中添加新块”的情况,其中所有其他尝试过(KDiff,BC,Araxis Merge,P4merge,Diffuse Merge, SourceGear Diffmerge)的不同之处在于将此块显示为“激进编辑”。

No for now. I heard about starting of planning new diff, which operates by logical blocks, not strings, but it was at the level of rumors

In current state I can see only one choice as best approach (and it's Windows-only-solution): CompareIt! as diif-tools - it can detect (to some extent) and show "moved blocks" inside file and most carefully handle the situation of "removal of chunk" + "adding new chunk in old strings", where all other tried (KDiff, BC, Araxis Merge, P4merge, Diffuse Merge, SourceGear Diffmerge) differs show this block as "aggressive edits".

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