~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/config.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-06-30 16:48:11 UTC
  • mfrom: (5967.9.6 regexps)
  • Revision ID: pqm@pqm.ubuntu.com-20110630164811-kpfgfqyzdzxnn8q6
(mbp) use explicit lazy regexps when appropriate (bug 608054) (Martin Pool)

Show diffs side-by-side

added added

removed removed

Lines of Context:
88
88
    bzrdir,
89
89
    debug,
90
90
    errors,
 
91
    lazy_regex,
91
92
    lockdir,
92
93
    mail_client,
93
94
    mergetools,
2943
2944
            raise errors.NoSuchConfigOption(name)
2944
2945
 
2945
2946
    def _show_matching_options(self, name, directory, scope):
2946
 
        name = re.compile(name)
 
2947
        name = lazy_regex.lazy_compile(name)
2947
2948
        # We want any error in the regexp to be raised *now* so we need to
2948
 
        # avoid the delay introduced by the lazy regexp.
 
2949
        # avoid the delay introduced by the lazy regexp.  But, we still do
 
2950
        # want the nicer errors raised by lazy_regex.
2949
2951
        name._compile_and_collapse()
2950
2952
        cur_conf_id = None
2951
2953
        cur_section = None