Changeset 366

Show
Ignore:
Timestamp:
01/19/06 01:57:20 (3 years ago)
Author:
athomas
Message:

RepoSearchPlugin:

  • Modified exclude/include logic.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • reposearchplugin/0.9/tracreposearch/tracreposearch.py

    r365 r366  
    3131                   'exclude', '').split(os.path.pathsep) if glob] 
    3232 
    33         if includes and not excludes: 
    34             excludes = ['*'] 
    35  
    3633        repo = self.env.get_repository(req.authname) 
    3734 
     
    4441        def searchable(path): 
    4542            # Exclude paths 
    46             searchable = 1 
    4743            for exclude in excludes: 
    4844                if fnmatch(path, exclude): 
    49                     searchable = 0 
    50                     break 
     45                    return 0 
    5146 
    5247            # Include paths 
    5348            for include in includes: 
    5449                if fnmatch(path, include): 
    55                     searchable = 1 
    56                     break 
     50                    return 1 
    5751 
    58             return searchable 
     52            return 1 
    5953 
    6054        def match_name(name):