Ignoring files by pattern

Patterns are useful for keeping the many temporary files created by some IDEs from being controlled in the database. Setting filters keeps uncontrolled files with the specified patterns from appearing as conflicts after you perform a Sync Work Area operation.

Procedure

  1. Start the Options dialog box by clicking Tools in the main menu and choosing Options.
  2. Click the Actions tab, then click Sync Work Area in the left pane.
  3. Modify the filter list.

    The Database defaults lists the mapping rules of files that are ignored. The list is set by the CM Administrator and shared by all users. You cannot add to or delete from the defaults list.

    To add to the My additional patterns list, type patterns directly in the scroll box, one pattern per line only. To remove a pattern, highlight it and delete it.

    Additionally, you can use pattern syntax values to further customize filters. The syntax is like standard wildcard strings. Thus, * matches 0 or more characters of any value, ? matches one character of any value, and \\ (Windows) and / (UNIX) separates directories.

    For example, a directory name followed by \\* matches all contents of a directory and its subdirectories. (The wildcard applies at the end of the string.)

    The following examples show ways to customize filters by using patterns:
    • Filter the tempfiles subdirectory in the myproj-me project:

      C:\\ccm_wa\\mydb\\myproj-me\\myproj\\tempfiles\\*

    • Filter the files residing in the tempfiles subdirectory in any project:

      tempfiles\\*

    • Filter all HTML files:

      *.html

    • Filter all Java™ files from the test directory:

      test\\*.java

    In the My additional patterns list, you can also add ignore mapping rules. The pattern string in the mapping rules, supports Unicode characters also which is not supported in the previous format of ignore patterns. The following examples show some ignore mapping rules:
    • Filter all tmp files:

      WHEN %name =~ '.*\.[Tt][Mm][Pp]' IGNORE

    • Ignore core files, but not directories named 'core':

      WHEN %name = 'core' && not %is_dir IGNORE

      To share filters with team members, have the CM administrator add them to the database defaults.

  4. Optionally, specify additional ignore patterns for an individual project.

    You specify additional ignore patterns for an individual project to allow the specification of a set of regular expressions to be ignored by the sync work area operation.

    In the root directory of the project, create a controlled file called _synergy_ignore_file_pattern.txt.

    This file is read using UTF-8 encoding. The syntax of this file is the same as the syntax used in the GUI Options dialog to define patterns to be ignored.

  5. To return to the default settings, click Use Defaults.
  6. Click Apply to save the changes.

Feedback