/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/workingtree.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-07-21 04:10:42 UTC
  • mfrom: (1836.1.31 ignores)
  • Revision ID: pqm@pqm.ubuntu.com-20060721041042-03dad3286bcc99ed
(jam) add bzrlib.ignores.add_runtime_ignores, for plugins that want to use it.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1105
1105
 
1106
1106
        Cached in the Tree object after the first call.
1107
1107
        """
1108
 
        ignorelist = getattr(self, '_ignorelist', None)
1109
 
        if ignorelist is not None:
1110
 
            return ignorelist
1111
 
 
1112
 
        ignore_globs = bzrlib.DEFAULT_IGNORE[:]
1113
 
 
1114
 
        ignore_globs.extend(ignores.get_user_ignores())
 
1108
        ignoreset = getattr(self, '_ignoreset', None)
 
1109
        if ignoreset is not None:
 
1110
            return ignoreset
 
1111
 
 
1112
        ignore_globs = set(bzrlib.DEFAULT_IGNORE)
 
1113
        ignore_globs.update(ignores.get_runtime_ignores())
 
1114
 
 
1115
        ignore_globs.update(ignores.get_user_ignores())
1115
1116
 
1116
1117
        if self.has_filename(bzrlib.IGNORE_FILENAME):
1117
1118
            f = self.get_file_byname(bzrlib.IGNORE_FILENAME)
1118
1119
            try:
1119
 
                ignore_globs.extend(ignores.parse_ignore_file(f))
 
1120
                ignore_globs.update(ignores.parse_ignore_file(f))
1120
1121
            finally:
1121
1122
                f.close()
1122
1123
 
1123
 
        self._ignorelist = ignore_globs
 
1124
        self._ignoreset = ignore_globs
1124
1125
        self._ignore_regex = self._combine_ignore_rules(ignore_globs)
1125
1126
        return ignore_globs
1126
1127
 
1130
1131
        :return: (ignore rules compiled regex, dictionary mapping rule group 
1131
1132
        indices to original rule.)
1132
1133
        """
1133
 
        if getattr(self, '_ignorelist', None) is None:
 
1134
        if getattr(self, '_ignoreset', None) is None:
1134
1135
            self.get_ignore_list()
1135
1136
        return self._ignore_regex
1136
1137