~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/msgeditor.py

  • Committer: Robert Collins
  • Date: 2005-10-11 07:21:00 UTC
  • mto: This revision was merged to the branch mainline in revision 1443.
  • Revision ID: robertc@robertcollins.net-20051011072100-16996b55c43ff24f
move editor into the config file too

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
import os
23
23
from subprocess import call
 
24
 
 
25
import bzrlib.config as config
24
26
from bzrlib.errors import BzrError
25
27
 
26
28
def _get_editor():
27
29
    """Return a sequence of possible editor binaries for the current platform"""
28
 
    from bzrlib.osutils import _read_config_value
29
 
    
30
30
    try:
31
31
        yield os.environ["BZR_EDITOR"]
32
32
    except KeyError:
33
33
        pass
34
34
 
35
 
    e = _read_config_value("editor")
 
35
    e = config.get_editor()
36
36
    if e is not None:
37
37
        yield e
38
38