This documentation relates to an earlier version of FishEye.
View

Unknown macro: {spacejump}

or visit the current documentation home.

By default, FishEye will cache and index your whole repository, and present all of this information to users. You can allow FishEye to process certain parts of your repository and/or disallow it from accessing other parts, by configuring inclusion/exclusion patterns for FishEye to follow. These patterns are set in the 'Include/Exclude Paths' repository option.

On this page:

Configuring Include/Exclude Paths

You can configure the include/exclude paths option for a specific repository or configure linkers for all repositories.

Configuring Include/Exclude for a Specific Repository

To configure the include/exclude paths option for a repository,

  1. Click the menu labelled with your user name in the the FishEye/Crucible header, and click the 'Administration' option. You will need to be logged in as an administrator to see this link. The FishEye/Crucible administration console will be displayed.
  2. Click the 'Repositories' link. The list of repositories set up in your FishEye instance will be displayed.
  3. Click the name of the repository, (under the 'Name' column in the list of repositories). The Repository Options for the repository will be displayed in a dialogue.
  4. Click the '*Include/Exclude Paths' tab. The 'Include/Exclude Paths' screen will be displayed (see screenshot below).
  5. Configure the includes/excludes for the repository as desired:
    • Click the 'Add...' link to add a new include/exclude pattern. See the Adding an Include and Adding an Exclude sections below for further instructions.
    • Click the cog icon () next to a linker and click 'Edit' from the dropdown menu to edit an include/exclude pattern. The editable 'Linker' dialogue is identical to the 'Add a Link' dialogue. See the Adding an Include and Adding an Exclude sections below for further instructions.
    • Click the cog icon () next to a linker and click 'Delete' from the dropdown menu to delete the include/exclude pattern.
  6. 変更を保存します。

Configure Include/Exclude for All Repositories

To configure the allow (process) for all repositories,

  1. Click the menu labelled with your user name in the the FishEye/Crucible header, and click the 'Administration' option. You will need to be logged in as an administrator to see this link. The FishEye/Crucible administration console will be displayed.
  2. Click the 'Defaults' link. The 'Repository Defaults' will be displayed.
  3. Click the 'Include/Exclude Paths' tab. The 'Include/Exclude Paths' screen will be displayed (see screenshot below).
  4. Configure the includes/excludes for all repositories as desired:
    • Click the 'Add...' link to add a new include/exclude pattern. See the Adding an Include and Adding an Exclude sections below for further instructions.
    • Click the cog icon () next to a linker and click 'Edit' from the dropdown menu to edit an include/exclude pattern. The editable 'Linker' dialogue is identical to the 'Add a Link' dialogue. See the Adding an Include and Adding an Exclude sections below for further instructions.
    • Click the cog icon () next to a linker and click 'Delete' from the dropdown menu to delete the include/exclude pattern.
  5. 変更を保存します。

Screenshot: Configuring Include/Exclude Paths for all repositories

Adding an Include

The 'Includes' subsection of the 'Include/Exclude Paths' screen defines what subtrees of your repository FishEye will index. FishEye defaults to including 'everything'. If you specify some 'include' directories, then FishEye will process only those directories (and all their subdirectories). For instance, you might want to do this to limit FishEye to the subset of active projects in your repository. Each include specifies the path to a subtree to be processed. Paths are expressed relative to the repository root configured in the repository configuration.

Includes do not support Antglobs. They are also defined relative to where FishEye connects to your repository. To match the 'tags' subtree, simply use /tags. Please note that Excludes can still make use of Antglobs.

To add a new include,

  1. Navigate to the linkers for a specific repository or the repository defaults, as described above, and click the 'Add...' link to add a new linker. The 'Add a Linker' dialogue will be displayed.
  2. Complete the fields on the dialogue as follows:
    • 'Tree' — Enter the tree of your repository that you want to include. See the example below.
    • 'Case Sensitive' — Tick this checkbox if you want your include to be case-sensitive. By default, Includes are case-sensitive but they can be configured to be case-insensitive. If your repository is set to be case-insensitive (Perforce) then Includes will also be case-insensitive, regardless of how the individual Includes are configured.


例:

  • Including directories:

    PROJECT1
    

    The code above includes /PROJECT1 and all its children (sub-directories and their contents). You could specify /PROJECT1/ and /PROJECT2/ to include both of these directories in FishEye's indexing.

Adding an Exclude

The 'Excludes' subsection of the 'Include/Exclude Paths' screen allows you to specifically exclude files and directories from those which have been included in indexing. FishEye will not process these files and directories. Each exclude is an Antglob Pattern.

To add a new linker,

  1. Navigate to the linkers for a specific repository or the repository defaults, as described above, and click the 'Add...' link to add a new linker. The 'Add a Linker' dialogue will be displayed.
  2. Complete the fields on the dialogue as follows:
    • 'Pattern' — Enter the pattern for directories/files that you want to exclude. See the examples below.
    • 'Case Sensitive' — Tick this checkbox if you want your exclude to be case-sensitive. By default, Excludes are case-sensitive but they can be configured to be case-insensitive. If your repository is set to be case-insensitive (Perforce) then Excludes will also be case-insensitive, regardless of how the individual Excludes are configured.


例:

  • Excluding directories:

    /PROJECT2/
    

    The code above excludes /PROJECT2 and all its children (sub-directories and their contents).

  • Excluding file types:

    **/*.OBJ
    

    The code above excludesany OBJ (object) files.

    Changes to Includes and Excludes do not take effect until the repository is restarted. If you do not re-index when changing the includes and excluded, files and directories which have been indexed prior to the update will remain visible in FishEye.

注意

Include/Exclude Processing

When processing includes and excluded, FishEye merges the includes and excludes from the repository itself with those from the repository defaults. The repository's specific includes and excludes take priority over those of the repository defaults. Once merged, FishEye processes include definitions first and then excludes. If there are any includes defined a path must match at least one of those includes to be considered. If there are no include patterns defined, all paths are considered to be included. Once includes have been processed, a path which is a candidate for processing is tested against any defined excludes. If the path matches any of the exclude patterns, the path is excluded and not included in FishEye.

About Setting the Repository Root

When you are setting the Allow (Process), you should be aware that the options on this page only act on the parts of the repository that lie under the level of the repository root, which you configure as a directory location in your repository. In other words, FishEye can only access directories "lower" than the repository root. For example, consider a repository with the following structure:

/CORE/2007/LEGACY/
/CORE/2008/PROJECT1/
/CORE/2008/PROJECT2/

In this case, you could set the repository root (or 'Path') to be /CORE/2008/. In that situation, you would be able to include or exclude the /PROJECT1/ and /PROJECT2/ directories, but the /CORE/2007/LEGACY/ directory would not be available. To have FishEye index all of the directories in this repository, you would need to set the repository root path to be /CORE/. Then, you could use the includes and excludes to add and remove directories under /CORE/ from FishEye's scan. For more information, see the Subversion configuration page and read the 'Path' options.

11 Comments

  1. David Corley

    Having set up exclusion rules, and seen them not work, I checked the forums to find Matt Watsons comment here:

    http://forums.atlassian.com/thread.jspa?messageID=257335942&#257335942

    I think the documentation needs to be updated to:

    1. Break down the phases of the initial scan and explain what each phase is for (creating changeset,index,generating linecount ,etc.). It would be really useful to know what to expect.

    2. Define which phase(s) actually apply the include/exclude rules. (it seems the "creating changesets" phase does not, but later phases do)

    1. Andrew

      Hi David,

      Thanks for your feedback. I've raised an improvement request for the points you've raised. http://jira.atlassian.com/browse/CRUC-4381

      Kind Regards,
      Andrew

  2. Anonymous

    didn't catch - does "include" accept ant like patterns - ie "*/.java"?

    P.S. I'm really tired of Atlassian sign on - i have a separate for jira, another one on the connectors tracker and i need one more here.

    Best regards, Alex

  3. Royce Wong

    Changes to Includes and Excludes do not take effect until the repository is restarted. If you do not re-index when changing the includes and excluded, files and directories which have been indexed prior to the update will remain visible in FishEye.

    I want to add some new include paths, so it seems I have to restart the repository, but will that trigger a full re-index? Anyone know the answer? What if I remove a include path, will that trigger a full re-index? It took 2+ weeks to index our repository and I hate to see that every time we add\remove a include path or exclude path we have to wait for 2+ weeks. Thanks.

    This is the message I got after I added some new include paths...

    A reindex and restart required

    A configuration change was made which requires a reindex and restart of the repository.

    1. Anonymous

      ++

      Only took 34 hours for us, but still... Does it perform a full rescan? Yes or no?

      1. Anonymous

        Just added a new branch (only a few revisions old) to the includes. Fisheye told me a rescan was necessary and now it's rescanning the whole tens of thousands of revisions... Please fix!

        1. mwatson

          Adding an include does trigger a whole re-index, for a number of reasons:

          • The now included path may have been tagged, so all the tags need to be rescanned
          • Any copies or moves from the newly included path to other scanned paths were previously treated as new files, these now need to be reprocessed as copies or moves
          • Similarly, moves into the included path were previously treated as deletes and now need to be treated as moves

          I appreciate that in some cases, none of this may apply, but to be sure, FishEye currently (2.7.6) forces a reindex to be sure.

          1. Anonymous

            Thanks for the explanation, Matthew!

            But I still don't understand why those points require a complete rescan:

            • If tags aren't included, no rescan is necessary. If they are, the normal incremental update on the tags path should be able to retrieve that information.
            • Once the new path is scanned, incremental update on the old paths should be able to identify the copies and moves from the new path.
            • Moves to the new path can be identified once the new path is scanned.
            • To make sure that nothing between adding the path to the repository and adding the path to Fisheye is missing, rescan from the revision the new path was added to the repository. No need to rescan from revision 0 when the branch was added in revision 95437.

            BTW, I'm talking about SVN, maybe those rescans are necessary with other versioning systems.

  4. Anonymous

    Can you please answer the following :

    - Are the excluded directories shown to users? As per the verbage looks like it wont, but want to confirm ...

    - How can REST API from an external application add exclude(s) to a repo.

    Our subversion server has hundreds of repos and we dont want the some of directories to be shown on FECRU UI. Please guide

    1. mwatson

  5. Anonymous

    Does adding an exclude start a whole new reindex?  The scan has already taken over a month, and we would like to start excluding some paths to try and get the indexing to finish.