1936
1936
class cmd_ignore(Command):
1937
1937
"""Ignore specified files or patterns.
1939
See ``bzr help patterns`` for details on the syntax of patterns.
1939
1941
To remove patterns from the ignore list, edit the .bzrignore file.
1941
Trailing slashes on patterns are ignored.
1942
If the pattern contains a slash or is a regular expression, it is compared
1943
to the whole path from the branch root. Otherwise, it is compared to only
1944
the last component of the path. To match a file only in the root
1945
directory, prepend './'.
1947
Ignore patterns specifying absolute paths are not allowed.
1949
Ignore patterns may include globbing wildcards such as::
1951
? - Matches any single character except '/'
1952
* - Matches 0 or more characters except '/'
1953
/**/ - Matches 0 or more directories in a path
1954
[a-z] - Matches a single character from within a group of characters
1956
Ignore patterns may also be Python regular expressions.
1957
Regular expression ignore patterns are identified by a 'RE:' prefix
1958
followed by the regular expression. Regular expression ignore patterns
1959
may not include named or numbered groups.
1942
After adding, editing or deleting that file either indirectly by
1943
using this command or directly by using an editor, be sure to commit
1961
1946
Note: ignore patterns containing shell wildcards must be quoted from
1962
1947
the shell on Unix.
1983
1968
bzr ignore "RE:(?!debian/).*"
1986
_see_also = ['status', 'ignored']
1971
_see_also = ['status', 'ignored', 'patterns']
1987
1972
takes_args = ['name_pattern*']
1988
1973
takes_options = [
1989
1974
Option('old-default-rules',