Author Topic: _mffind with exclusions  (Read 5840 times)

nicktook

  • Community Member
  • Posts: 14
  • Hero Points: 0
_mffind with exclusions
« on: August 15, 2007, 07:20:05 pm »
I am trying to execute an _mffind on a directory tree and exclude any .svn subdirectories encountered.   The documentation for _mffind function lists a file_exclude parameter but gives no indication as to how it can be used.  Setting it to just ".svn' or "*.svn" does not seem to work. Can this function do what I want and if so, how?

hs2

  • Senior Community Member
  • Posts: 2754
  • Hero Points: 291
Re: _mffind with exclusions
« Reply #1 on: August 15, 2007, 07:34:48 pm »
Try '\\.svn\\*' on Windows resp. '/.svn/*' on UNIX
Hope it works, HS2

nicktook

  • Community Member
  • Posts: 14
  • Hero Points: 0
Re: _mffind with exclusions
« Reply #2 on: August 15, 2007, 08:11:48 pm »
This did not work: '\\.svn\\*'

Note: I am running SE 12.0.2.0 on WinXP connected to a Samba share on a Linux server.

It would be a partial solution if I could just exclude two patterns.  The .svn directory contains all the files that Subversion uses to keep its state.  Among these are:

.svn/text-base/XXX.svn-base
  This is a pristine copy of the last checked out version of file XXX

.svn/prop-base/XXX.svn-base
.svn/props/XXX.svnwork

I am not quite certain what these last two are but there seems to be one of them for each checked out file.

I have successfully excluded the .svn_base files with the exclusion: "*.svn-base".  This eliminates most of the search hits but it still spends more time then I would like doing the search.  If I could figure out how to exclude the .svn_work files at the time time it would run a bit quicker.


jbhurst

  • Senior Community Member
  • Posts: 405
  • Hero Points: 33
Re: _mffind with exclusions
« Reply #3 on: August 15, 2007, 09:19:13 pm »
I think *\.svn\* works to exclude the svn directories from projects on Windows.

Another option is to configure Windows Explorer with "Do not show hidden files and folders", in the View tab of Folder Options (Tools > Folder Options). SlickEdit captures this setting when it starts, and honors it in displaying files and directories in most places, including files added to projects. Note that you need to restart SlickEdit if you change this setting.

Regards

John Hurst
Wellington, New Zealand



hs2

  • Senior Community Member
  • Posts: 2754
  • Hero Points: 291
Re: _mffind with exclusions
« Reply #4 on: August 15, 2007, 09:27:47 pm »
John is perfectly right. I quickly tested it myself and this example works (omits the '.bak' subdir)
Quote
   _mffind ("slick.sh", 'IW', '+t 'get_env ("VSLICKMACROS")'..\', '', MFFIND_THREADED | MFFIND_GLOBAL, false, false, '*.e', '*\.bak\*');
HS2

nicktook

  • Community Member
  • Posts: 14
  • Hero Points: 0
Re: _mffind with exclusions
« Reply #5 on: August 15, 2007, 09:33:28 pm »
*\.svn\* worked.

Thanks.