Beyond Compare比较目录/文件时即使相同也显示红色

在用BC比较两个文件目录时,经常会用到"Actions">"Compare Contents"命令,发现有时即使两个文件完全相同的目录比较完成后也是红色(有差异),但单个文件打开比较并关闭后才变成黑色。此时如果要比较有很多个文件的代码目录时每个都打开比较不太现实。搜素了下发现只需要在Action:的单选按钮中选择"Rules-based comparison"即可解决目录比较的问题。

同时,如果想打开就开始自动比较,需设置:"Session" > "Session Settings..." > "Comparison" Tab: 在"Requires opening files:" 下选中"Compare contents"并选择"Rules-based comparison"选项。



Reference:

https://stackoverflow.com/questions/35800963/beyondcompare-compare-contents-not-changing-color-to-black-when-files-match

Q: I just purchased the pro version of Beyond Compare 4 for Windows. I'm using it to compare a Windows folder to a folder on a Linux machine using SFTP. When I select all of the files and do a 'Compare Contents', I wold expect the color to change to black if the files are the same. This is not happening. If I double click on a file to open a new tab displaying the file contents and then close that tab, the color changes to black (of course, only when the files are the same). I'm guessing this has something to do with the fact that I'm using SFTP or that I'm comparing Windows files to Linux files. I have over 4 thousand files to compare so opening each one is not a viable option. This has always worked for me when comparing windows files (and I've been using BC for years). Thanks for any help.

A: Based on what you're describing,you're doing a binary or CRC comparison when you do "Compare Contents" command, and BC is correctly detecting that the files are not identical. When you open them in the file viewer it does a smarter rules-based comparison, which accounts for things like differences in file encoding and line endings, allowing them to be shown as matches. To get that behavior in the folder view, when you do the "Content Compare" command, change the radio button under "Action" to "Rules-based comparison". If you aren't getting a dialog when you use the command, you can re-enable it in the Options dialog, under "File Operations", with the "Confirm content compare" checkbox.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值