WinMerge 过滤器的使用方法

WinMerge是一款开源的文件对比合并工具。
http://winmerge.org/
WinMerge提供了“过滤器”功能,可以在对比时排除特定的目录或文件。
版本:2.16.22.0 64位
版本信息

1、编辑过滤规则

工具 -> 滤镜 -> 双击Exclude Source Control -> 编辑 -> SourceControl.flt -> 在最后输入过滤规则
在这里插入图片描述在这里插入图片描述
配置内容

2、过滤规则简单说明

f: <正则表达式> 表示过滤文件名,如果正则表达式要过滤““.”,则前面要加 \ 转义
d: <正则表达式> 表示过滤目录
## 表示注释

3、过滤例子

文件
(1)f: .iml$
过滤所有包含.iml的文件名
(2)f: ^test.class$
过滤文件名为test.class的文件
文件夹
(1)d: \.idea$

4、规则测试

在修改过滤器的时候,有一个“测试”按钮,这里输入的内容,如果能够显示出来的话,则会显示“passed”,如果不会显示在列表中,则会显示“failed”。
在这里插入图片描述在这里插入图片描述

附:SourceControl.flt文件内容:

## This is a directory/file filter for WinMerge 
## This filter lets through only files ASP.NET developers care about 
name: Exclude Source Control
desc: Exclude Source Control files and directories

## This is an inclusive (loose) filter
## (it lets through everything not specified)
def: include


## Filters for filenames begin with f: 
## Filters for directories begin with d: 
## (Inline comments begin with " ##" and extend to the end of the line) 

## f: \.bzrignore$ ## Bazaar ignore file
## f: \.cvsignore$ ## CVS ignore file
## f: \.gitignore$ ## Git ignore file
## f: \.hgignore$ ## Mercurial ignore file
## f: \.svnignore$ ## Subversion ignore file

f: \.(vs[sp])?scc$  ## Visual SourceSafe files

d: \\\.svn$ ## Subversion working copy
d: \\_svn$  ## Subversion working copy ASP.NET Hack
d: \\cvs$   ## CVS control directory
d: \\\.git$ ## Git directory
d: \\\.bzr$ ## Bazaar branch
d: \\\.hg$ ## Mercurial repository

如有错误,欢迎指正感谢!!!

猜你喜欢

转载自blog.csdn.net/qq_19320227/article/details/127867029
今日推荐