~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tree.py

  • Committer: Marius Kruger
  • Date: 2009-05-02 21:26:05 UTC
  • mto: (4332.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 4334.
  • Revision ID: amanic@gmail.com-20090502212605-xw6027quavhmbl4v
Make it possible to blackboxtest rules
* extract rules.reset_rules()
* tree.iter_search_rules now uses the default parameter differently
  to ensure that if we change our rules._per_user_searcher
  after tree.py loaded, that the new one will get used.

Show diffs side-by-side

added added

removed removed

Lines of Context:
657
657
            return None
658
658
 
659
659
    def iter_search_rules(self, path_names, pref_names=None,
660
 
        _default_searcher=rules._per_user_searcher):
 
660
        _default_searcher=None):
661
661
        """Find the preferences for filenames in a tree.
662
662
 
663
663
        :param path_names: an iterable of paths to find attributes for.
667
667
        :return: an iterator of tuple sequences, one per path-name.
668
668
          See _RulesSearcher.get_items for details on the tuple sequence.
669
669
        """
 
670
        if _default_searcher is None:
 
671
            _default_searcher = rules._per_user_searcher
670
672
        searcher = self._get_rules_searcher(_default_searcher)
671
673
        if searcher is not None:
672
674
            if pref_names is not None: