~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/rules.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-05-06 04:07:37 UTC
  • mfrom: (4332.1.1 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20090506040737-tdiqyojy2uia33qb
Make it easier to blackbox test rules (Marius Kruger)

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
FILE_PREFS_PREFIX = 'name '
37
37
FILE_PREFS_PREFIX_LEN = len(FILE_PREFS_PREFIX)
38
38
 
 
39
# The object providing default rules
 
40
_per_user_searcher = None
 
41
 
39
42
 
40
43
class _RulesSearcher(object):
41
44
    """An object that provides rule-based preferences."""
146
149
    return osutils.pathjoin(config.config_dir(), 'rules')
147
150
 
148
151
 
149
 
# The object providing default rules
150
 
_per_user_searcher = _IniBasedRulesSearcher(rules_filename())
 
152
def reset_rules():
 
153
    global _per_user_searcher
 
154
    _per_user_searcher = _IniBasedRulesSearcher(rules_filename())
 
155
 
 
156
reset_rules()