~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/config.py

  • Committer: Martin Pool
  • Date: 2011-06-13 22:39:49 UTC
  • mto: This revision was merged to the branch mainline in revision 6004.
  • Revision ID: mbp@canonical.com-20110613223949-bxs9qknusts7llkp
Explicitly use lazy_regexp where we count on its error reporting behaviour

Show diffs side-by-side

added added

removed removed

Lines of Context:
81
81
    bzrdir,
82
82
    debug,
83
83
    errors,
 
84
    lazy_regex,
84
85
    lockdir,
85
86
    mail_client,
86
87
    mergetools,
2780
2781
            raise errors.NoSuchConfigOption(name)
2781
2782
 
2782
2783
    def _show_matching_options(self, name, directory, scope):
2783
 
        name = re.compile(name)
 
2784
        name = lazy_regex.lazy_compile(name)
2784
2785
        # We want any error in the regexp to be raised *now* so we need to
2785
 
        # avoid the delay introduced by the lazy regexp.
2786
 
        if getattr(name, _compile_and_collapse):
2787
 
            name._compile_and_collapse()
 
2786
        # avoid the delay introduced by the lazy regexp.  But, we still do
 
2787
        # want the nicer errors raised by lazy_regex.
 
2788
        name._compile_and_collapse()
2788
2789
        cur_conf_id = None
2789
2790
        cur_section = None
2790
2791
        for c in self._get_configs(directory, scope):