首页 > Windows开发 > 详细

WinMerge 过滤器用法

时间:2017-02-16 22:23:09      阅读:553      评论:0      收藏:0      [点我收藏+]

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

WinMerge 过滤器用法

原文:http://www.cnblogs.com/gdjlc/p/6406933.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!