b.ignores : module documentation

Part of bzrlib

Lists of ignore files, etc.
Function parse_ignore_file Read in all of the lines in the file and turn it into an ignore list
Function get_user_ignores Get the list of user ignored files, possibly creating it.
Function add_unique_user_ignores Add entries to the user's ignore list if not present.
Function add_runtime_ignores Add some ignore patterns that only exists in memory.
Function get_runtime_ignores Get the current set of runtime ignores.
Function tree_ignores_add_patterns Add more ignore patterns to the ignore file in a tree.
Function _set_user_ignores Fill out the user ignore file with the given patterns
def parse_ignore_file(f):
Read in all of the lines in the file and turn it into an ignore list

Continue in the case of utf8 decoding errors, and emit a warning when such and error is found. Optimise for the common case -- no decoding errors.

def get_user_ignores():
Get the list of user ignored files, possibly creating it.
def _set_user_ignores(patterns):
Fill out the user ignore file with the given patterns

This may raise an error if it doesn't have permission to write to the user ignore file. This is mostly used for testing, since it would be bad form to rewrite a user's ignore list. bzrlib only writes this file if it does not exist.

def add_unique_user_ignores(new_ignores):
Add entries to the user's ignore list if not present.
Parametersnew_ignoresA list of ignore patterns
ReturnsThe list of ignores that were added
def add_runtime_ignores(ignores):
Add some ignore patterns that only exists in memory.

This is used by some plugins that want bzr to ignore files, but don't want to change a users ignore list. (Such as a conversion script that needs to ignore temporary files, but does not want to modify the project's ignore list.)

ParametersignoresA list or generator of ignore patterns.
ReturnsNone
def get_runtime_ignores():
Get the current set of runtime ignores.
def tree_ignores_add_patterns(tree, name_pattern_list):
Add more ignore patterns to the ignore file in a tree. If ignore file does not exist then it will be created. The ignore file will be automatically added under version control.
ParameterstreeWorking tree to update the ignore list.
name_pattern_listList of ignore patterns.
ReturnsNone
API Documentation for Bazaar, generated by pydoctor at 2022-06-16 00:25:16.