How to ignore SVN folders in WinMerge?
Asked Answered
Y

5

129

I'm trying to recursively compare two Subversion working copy folders using WinMerge.

Unfortunately, WinMerge displays lots of differencing files inside of the subversion control folders (.svn or _svn).

Is it possible to somehow exclude the subversion folders from the comparison?

Yaws answered 25/9, 2009 at 13:18 Comment(0)
A
130

Try making a Filefilter

WinMerge handles this just fine. You want to create and use a Filter. Under Tools | Filters... | Filefilters, create a new filter or modify an existing one.

It will look like this:

## Ignore Java class and jar files
f: \.class$
f: \.jar$

## Ignore subversion housekeeping directories
d: \\.svn$
d: \\._svn$

Save it, then when selecting items to merge, select the filter you defined from the Select Files or Folders dialog box. Bonus points: It will save this and use it as a default for future merges.

Andromede answered 25/9, 2009 at 13:27 Comment(3)
Thanks a lot! I discovered that there is even a predefined filter to exclude source control files and folders.Yaws
Hi Martin, you might want to accept 4h24d's answer as well since it is simpler than this and appropriate and thus has been voted better so far.Interpretative
Better filter "\\\.svn$" (predefined filter) so you match '.' and not <any character> before 'svn'.Thirza
U
90

Try Builtin File Filter

WinMerge (Version 2.12.4) already includes a filter to exclude source control files and directories, and it's called Exclude Source Control.

It works for Subversion, CVS, Git, Bazaar and Mercurial, and it doesn't require you to create a filter, you just have to apply it during the comparison.

Ulmaceous answered 8/10, 2009 at 13:48 Comment(2)
thanks for the information. i would like to avoid selecting everytime i compare. is there anyway we can make it apply "Exclude Source control" files by default?Jennijennica
I wasn't getting this option in a fresh install when I selected 2 folders and clicked 'Compare'. To enable it I had to select one folder, click 'Compare...' which shows a dialog with some options for filters. Here I selected the second folder and the 'Exclude Source Control' filter, and it worked. The filter is saved, so new if I just select 2 folders and click 'Compare' the filter is applied without the dialog.Pamper
M
26

Uncomment some lines in builtin filefilter

WinMerge (Version 2.12.4) already includes a filter but (at least in my installation) the filters for Subversion, Git and Bazaar were commented out.

Navigate here: Tools | Filters | Filefilters | Exclude Source Control (double click to edit)

Edit the lines to look like this:

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
Macaroon answered 16/4, 2010 at 9:32 Comment(1)
Better filter "\\\.svn$" (predefined filter) so you match '.' and not <any character> before 'svn'.Thirza
J
0

n the latest versions you can specify on the Select Files dialog:

enter image description here

See https://github.com/WinMerge/winmerge/discussions/1571

Jumbala answered 12/2 at 18:57 Comment(0)
H
0

Unfortunately, the built-in version control filter didn't work when using WinMerge from a command line. Check in WinMerge Help: Using Filters -> Using file filters -> File filter syntax 1.2. File mask syntax and example

The following worked for me to skip a .git directory:

WinMergeU.exe /f '!.git\'  dir_1  dir_2
Hobnail answered 4/4 at 23:43 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.