~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/msgeditor.py

  • Committer: Martin Pool
  • Date: 2011-02-07 01:30:38 UTC
  • mto: This revision was merged to the branch mainline in revision 5650.
  • Revision ID: mbp@canonical.com-20110207013038-kbm3fx0pemehjnk2
Use cmdline.split on BZR_EDITOR so that you can pass names including spaces.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005-2010 Canonical Ltd
 
1
# Copyright (C) 2005-2011 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
23
23
import sys
24
24
 
25
25
from bzrlib import (
 
26
    cmdline,
26
27
    config,
27
28
    osutils,
28
29
    trace,
59
60
def _run_editor(filename):
60
61
    """Try to execute an editor to edit the commit message."""
61
62
    for candidate, candidate_source in _get_editor():
62
 
        edargs = candidate.split(' ')
 
63
        edargs = cmdline.split(candidate)
63
64
        try:
64
65
            ## mutter("trying editor: %r", (edargs +[filename]))
65
66
            x = call(edargs + [filename])