~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: John Arbash Meinel
  • Date: 2006-12-12 15:09:10 UTC
  • mfrom: (2135.2.8 lp57637)
  • mto: This revision was merged to the branch mainline in revision 2179.
  • Revision ID: john@arbash-meinel.com-20061212150910-yxyy4ioaclh6z7m8
(Kent Gibson, Jan Hudec) Better glob pattern matcher (fixes bug #57637)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1581
1581
    To remove patterns from the ignore list, edit the .bzrignore file.
1582
1582
 
1583
1583
    Trailing slashes on patterns are ignored. 
1584
 
    If the pattern contains a slash, it is compared to the whole path
1585
 
    from the branch root.  Otherwise, it is compared to only the last
1586
 
    component of the path.  To match a file only in the root directory,
1587
 
    prepend './'.
 
1584
    If the pattern contains a slash or is a regular expression, it is compared 
 
1585
    to the whole path from the branch root.  Otherwise, it is compared to only
 
1586
    the last component of the path.  To match a file only in the root 
 
1587
    directory, prepend './'.
1588
1588
 
1589
1589
    Ignore patterns specifying absolute paths are not allowed.
1590
1590
 
1591
 
    Ignore patterns are case-insensitive on case-insensitive systems.
 
1591
    Ignore patterns may include globbing wildcards such as:
 
1592
      ? - Matches any single character except '/'
 
1593
      * - Matches 0 or more characters except '/'
 
1594
      /**/ - Matches 0 or more directories in a path
 
1595
      [a-z] - Matches a single character from within a group of characters
 
1596
 
 
1597
    Ignore patterns may also be Python regular expressions.  
 
1598
    Regular expression ignore patterns are identified by a 'RE:' prefix 
 
1599
    followed by the regular expression.  Regular expression ignore patterns
 
1600
    may not include named or numbered groups.
1592
1601
 
1593
 
    Note: wildcards must be quoted from the shell on Unix.
 
1602
    Note: ignore patterns containing shell wildcards must be quoted from 
 
1603
    the shell on Unix.
1594
1604
 
1595
1605
    examples:
1596
1606
        bzr ignore ./Makefile
1597
1607
        bzr ignore '*.class'
 
1608
        bzr ignore 'lib/**/*.o'
 
1609
        bzr ignore 'RE:lib/.*\.o'
1598
1610
    """
1599
1611
    takes_args = ['name_pattern*']
1600
1612
    takes_options = [