Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to enable meld file filters

Tags:

meld

I use meld normally in a git web project (system: Ubuntu-gnome 13.10).

I want it to skip scanning certain files and folders, such as the .meteor directory (which takes a while to scan).

Ubuntu-Gnome installs meld 1.8.1. It has under Edit -> Preferences -> File Filters an option to add a new file filter. More details: http://meldmerge.org/help/file-filters.html#file-name-filter

I added new rules for the file and folder I want to skip (and checked the 'activate' option), but it does not seem to work, even after restarting meld.

The new rules just don't seem to work - I see meld is scanning the .meteor folder and also, it shows the allegedly ignored file (index.html) as changed. I don't see an open meld bug for "file filters not working". I am inclined to think it does work, only I'm doing something wrong. Any ideas how to tackle this would be most welcome!

like image 632
tivoni Avatar asked Nov 02 '13 03:11

tivoni


People also ask

How do I compare folders in Meld?

Meld lets you compare two or three folders side-by-side. You can start a new folder comparison by selecting the File ▸ New... menu item, and clicking on the Directory Comparison tab. Your selected folders will be shown as side-by-side trees, with differences between files in each folder highlighted.

What is Linux Meld command?

"Meld is a visual diff and merge tool targeted at developers. Meld helps you compare files, directories, and version controlled projects. It provides two- and three-way comparison of both files and directories, and has support for many popular version control systems.

How do I start Meld in Linux?

If you start Meld from the command line, you can tell it what to do when it starts. For a two- or three-way file comparison, start Meld with meld file1 file2 or meld file1 file2 file3 respectively. For a two- or three-way directory comparison, start Meld with meld dir1 dir2 or meld dir1 dir2 dir3.


2 Answers

I'm currently using Meld version 3.18.0 on Ubuntu 18.04. The meld documentation mentions custom filters. The settings menu is accessible when meld has the focus. It is located at the top-left menu of your screen.

I've made a screenshot. How to add a filter in meld

like image 90
MadMike Avatar answered Oct 07 '22 13:10

MadMike


I have an answer for my own question, somewhat:

Meld has two modes:

  1. VC (Version Control): Meld compares against the VC image of the directory, and ignores the File Filters option
  2. Non-VC mode: the filters kick in

This makes somewhat sense, a way.

I use meteor.js which has a .meteor folder for project meta data. In it there are pulled packages, their src and other meta. Many files/folder, in short. The .meteor folder is listed in the .gitignore file, so git excludes it. Meld on the other hand, revisits it and spends a while scanning its sub folders, which seems to take "forever".

I looked for ways to prevent it. One direction was to use the File Filters feature. Another, would be for meld (in VC-mode) skip ignored content.

Meld has a reported issue "Have meld use the .gitignore to limit scanned dir/files", see: https://bugzilla.gnome.org/show_bug.cgi?id=684400

As of today this issue is fixed (repo head contains it). Looks like it will be in meld ver 3.11.1 and onward. As expected, this fix solves my problem.

As a side note, it might take a while for this fix to get to Deb/Ubuntu, so if you need it, use meld head from: http://meldmerge.org/development.html

like image 2
tivoni Avatar answered Oct 07 '22 13:10

tivoni