~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/msgeditor.py

Accept and tweak David Clymers BZREDITOR support patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
    """Return a sequence of possible editor binaries for the current platform"""
28
28
    from bzrlib.osutils import _read_config_value
29
29
    
 
30
    try:
 
31
        yield os.environ["BZR_EDITOR"]
 
32
    except KeyError:
 
33
        pass
 
34
 
30
35
    e = _read_config_value("editor")
31
36
    if e is not None:
32
37
        yield e
34
39
    try:
35
40
        yield os.environ["EDITOR"]
36
41
    except KeyError:
37
 
        if os.name == "nt":
38
 
            yield "notepad.exe"
39
 
        elif os.name == "posix":
40
 
            yield "/usr/bin/vi"
 
42
        pass
 
43
 
 
44
    if os.name == "nt":
 
45
        yield "notepad.exe"
 
46
    elif os.name == "posix":
 
47
        yield "/usr/bin/vi"
41
48
 
42
49
 
43
50
def _run_editor(filename):