~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/msgeditor.py

  • Committer: Aaron Bentley
  • Date: 2005-10-01 06:48:01 UTC
  • mto: (1185.12.13)
  • mto: This revision was merged to the branch mainline in revision 1419.
  • Revision ID: aaron.bentley@utoronto.ca-20051001064801-7400c2ed0fe26080
Made iter_conflicts a WorkingTree method

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
26
24
from bzrlib.errors import BzrError
27
25
 
28
26
def _get_editor():
29
27
    """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 = config.GlobalConfig().get_editor()
 
35
    e = _read_config_value("editor")
36
36
    if e is not None:
37
37
        yield e
38
38
        
114
114
            msg.append(line)
115
115
            
116
116
        if len(msg) == 0:
117
 
            return ""
 
117
            return None
118
118
        # delete empty lines at the end
119
119
        del msg[lastline:]
120
120
        # add a newline at the end, if needed