如何可视化或格式化diff /补丁文件? [英] How to visualize or format a diff / patch file?
问题描述
我有一个补丁文件(统一差异),如 svn diff
, git diff
的输出 diff -u ...
。我想审查它,但统一的差异格式 - 尤其是与许多文件和放大器。更改 - 很难在我的眼睛。
如何从补丁文件得到一个很好的格式化差异视图?我没有文件本身,只有差异,所以我不能使用所有常规的差异工具。
到目前为止,我的2最好的战术是: p>
- 在gvim中加载diff并获得一些语法突出显示
- 将diff粘贴到Trac wiki中
#!diff
-formatted部分,然后点击预览 - 这将创建一个真棒差异视图:
{{{
#!diff
< unified diff here>
}}}
有桌面工具可以做到吗?有没有办法说服kdiff3 / diffmerge / p4merge /等来可视化的补丁文件?一些复制Trac的可视化效果也会很好。
编辑:Windows支持的额外优势,最好是安装程序或无痛苦安装。
尝试使用kompare - http://www.caffeinated.me.uk/kompare/ 。它应该做的工作。
How can I get a nicely-formatted diff view from the patch file? I don't have the files themselves, only the diff, so I can't use all the regular diff tools.
So far my 2 best tactics are:
- Load the diff in gvim and get some syntax highlighting
- Paste the diff into a Trac wiki in a
#!diff
-formatted section and click "preview" - this creates an awesome diff view:
{{{ #!diff <unified diff here> }}}
Are there desktop tools that can do this? Is there a way to persuade kdiff3 / diffmerge / p4merge / etc. to visualize the patch file? Something that replicates Trac's visualization would be great as well.
EDIT: bonus points for Windows support as well, preferably with an installer or a pain-free installation.
Try using kompare - http://www.caffeinated.me.uk/kompare/. It should do the job.
EDIT: Also, check out the list of file comparison tools here: http://en.wikipedia.org/wiki/Comparison_of_file_comparison_tools - have a look at the column "Patch preview" in one of the tables.
这篇关于如何可视化或格式化diff /补丁文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!