WinMerge 过滤器用法

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

1、编辑过滤规则
工具 -> 过滤器 -> Exclude Source Control -> 编辑 -> SourceControl.flt -> 在最后输入过滤规则

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

3、过滤例子
(1)f: \.bak$ 
   过滤所有.bak的文件名
(2)f: ^1.txt$
   过滤文件名1.txt  

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
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值