Ticket #2275 (closed enhancement: fixed)
Find file: ignore_dir should allow to specify relative, not only absolute paths
Reported by: | ossi | Owned by: | andrew_b |
---|---|---|---|
Priority: | minor | Milestone: | 4.8.0-pre1 |
Component: | mc-core | Version: | master |
Keywords: | Cc: | zaytsev, gotar@… | |
Blocked By: | Blocking: | ||
Branch state: | Votes for changeset: | committed-master |
Description (last modified by zaytsev) (diff)
Most of the time there is no point in searching through the repository data of the version control systems.
To this end, ignore_dirs should allow to specify relative directory names, such as ".svn" in the mc.ini file.
This patch is somewhat crude - the list should be probably come from a config file. the list isn't complete, either - it covers only the VCS i'm using.
One might consider adding a checkbox (like the "skip hidden") to the actual search dialog, but i think this is pretty much pointless and thus not worth the ui clutter.
Attachments
Change History
Changed 14 years ago by ossi
- Attachment 0001-search-skip-working-copy-meta-data-of-known-version-.patch added
comment:1 Changed 14 years ago by andrew_b
We already nave ignore_dirs variable in config file. This variable should be used instead of hardcoded direcory names.
comment:2 Changed 14 years ago by zaytsev
- Cc zaytsev added
Very bad idea.
One thing that I do quite often is to mass-move or remove directories that I find via the Find file dialog. This might be .idea folders, .svn junk or whatever it is in every specific case. You just search for them, then hit Panelize and remove them all, or move to some other location.
Now this undocumented change will break part of my searches without me having a clue on why did this happen if I wouldn't have stumbled upon this ticket.
Use ignore_dirs and Skip hidden, it's documented in the man page.
comment:3 Changed 14 years ago by ossi
the doc of ignore_dirs suggests that it specifies only absolute paths. if it is so, it is completely useless for my purposes - you know how many .svn directories a big checkout has, right? otherwise, the doc needs adjustment.
regarding zaytsev's use case ... the patch does in fact do too much. it wasn't supposed to prevent finding those directories, only to prevent descending into them. as i wrote, it is somewhat crude ...
comment:4 Changed 14 years ago by zaytsev
- Description modified (diff)
- Summary changed from search: skip working copy meta data of known version control systems to Find file: ignore_dir should allow to specify relative, not only absolute paths
It is true that ignore_dirs does not allow to specify relative paths. Well, it kinda does, but this will break on recursive searches. Let us re-purpose this ticket to enhance the existing setting.
comment:7 Changed 14 years ago by andrew_b
- Status changed from new to accepted
- Owner set to andrew_b
- Blocked By 2366 added
comment:8 Changed 14 years ago by andrew_b
- Blocked By 2366 removed
- Milestone changed from 4.7 to 4.8.0-pre1
comment:9 Changed 14 years ago by andrew_b
- severity changed from no branch to on review
Created 2275_ignore_relative_dirs branch. Parent branch is master.
changeset:34c95cac0dfc10a4a993b3e99bd1849726a9f401
comment:10 Changed 14 years ago by bilbo
I tried it, I found few things I don't like:
If I am already inside directory that is excluded from search (for example if I exclude .svn and then I enter some .svn directory and start search), the search won't find anything, even if directories below have names not excluded. It will work though, if I descend one level deeper.
There is no indication, that something is excluded. People may get confused if they forgot they configured the exclusion. Perhaps once search is over, it could display something like "Finished (3 paths excluded from search)" instead of just "Finished" in case something is excluded.
Also, there could be a way to temporarily disable this, as in some rare cases you want to actually look for stuff inside .svn directories or alike ....
comment:11 Changed 14 years ago by andrew_b
- severity changed from on review to on rework
Everything sounds reasonably. I'ii try to implement that
comment:12 Changed 14 years ago by andrew_b
- severity changed from on rework to on review
New initial changeset:7109ebd9a526557d68b3e5752018c5e9c8c8f043.
Please review again.
comment:14 Changed 14 years ago by angel_il
- Votes for changeset changed from slavazanko to slavazanko angel_il
- severity changed from on review to approved
comment:15 Changed 14 years ago by andrew_b
- Status changed from accepted to testing
- Votes for changeset changed from slavazanko angel_il to committed-master
- Resolution set to fixed
- severity changed from approved to merged
Merged to master.
changeset:e4ee7ea38356fceca76f577ae440ab411b55ce83
git log --pretty=oneline a5bf2b5..e4ee7ea
comment:16 Changed 14 years ago by andrew_b
- Status changed from testing to closed
- Blocking 1762 removed