~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/msgeditor.py

  • Committer: Vincent Ladeuil
  • Date: 2007-11-04 15:29:17 UTC
  • mfrom: (2961 +trunk)
  • mto: (2961.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 2962.
  • Revision ID: v.ladeuil+lp@free.fr-20071104152917-nrsumxpk3dikso2c
Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
import bzrlib
27
27
import bzrlib.config as config
28
 
from bzrlib import osutils
29
28
from bzrlib.errors import BzrError, BadCommitMessageEncoding
30
29
from bzrlib.trace import warning, mutter
31
30
 
61
60
            ## mutter("trying editor: %r", (edargs +[filename]))
62
61
            x = call(edargs + [filename])
63
62
        except OSError, e:
64
 
            # We're searching for an editor, so catch safe errors and continue
65
 
            if e.errno in (errno.ENOENT, ):
66
 
                continue
67
 
            raise
 
63
           # We're searching for an editor, so catch safe errors and continue
 
64
           if e.errno in (errno.ENOENT, ):
 
65
               continue
 
66
           raise
68
67
        if x == 0:
69
68
            return True
70
69
        elif x == 127:
205
204
    """
206
205
    import tempfile
207
206
    tmp_fileno, msgfilename = tempfile.mkstemp(prefix='bzr_log.',
208
 
                                               dir='.',
 
207
                                               dir=u'.',
209
208
                                               text=True)
210
 
    msgfilename = osutils.basename(msgfilename)
211
209
    msgfile = os.fdopen(tmp_fileno, 'w')
212
210
    try:
213
211
        if start_message is not None: