~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Kent Gibson
  • Date: 2006-11-28 17:01:36 UTC
  • mto: (2178.1.1 jam-integration)
  • mto: This revision was merged to the branch mainline in revision 2179.
  • Revision ID: warthog618@gmail.com-20061128170136-b11d15f1de7992af
Ignore pattern matcher (glob.py) patches:
 - '*' now matches leading '.' as per fnmatch.
 - Support '**' extension as per zsh.  
 - fixed case-insensitive match on case-insensitive platforms.
 - Updated NEWS.

Show diffs side-by-side

added added

removed removed

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