~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/msgeditor.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-10-01 07:56:03 UTC
  • mfrom: (3224.5.40 faster-startup)
  • Revision ID: pqm@pqm.ubuntu.com-20081001075603-s9nynw8y85fmrprj
Reduce startup time by a small amount. (Andrew Bennetts)

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
from subprocess import call
24
24
import sys
25
25
 
26
 
import bzrlib
27
 
import bzrlib.config as config
28
 
from bzrlib import osutils
 
26
from bzrlib import (
 
27
    config,
 
28
    osutils,
 
29
    )
29
30
from bzrlib.errors import BzrError, BadCommitMessageEncoding
30
 
from bzrlib.trace import warning, mutter
 
31
from bzrlib.trace import warning
31
32
 
32
33
 
33
34
def _get_editor():
102
103
    """
103
104
 
104
105
    if not start_message is None:
105
 
        start_message = start_message.encode(bzrlib.user_encoding)
106
 
    infotext = infotext.encode(bzrlib.user_encoding, 'replace')
 
106
        start_message = start_message.encode(osutils.get_user_encoding())
 
107
    infotext = infotext.encode(osutils.get_user_encoding(), 'replace')
107
108
    return edit_commit_message_encoded(infotext, ignoreline, start_message)
108
109
 
109
110
 
144
145
        f = file(msgfilename, 'rU')
145
146
        try:
146
147
            try:
147
 
                for line in codecs.getreader(bzrlib.user_encoding)(f):
 
148
                for line in codecs.getreader(osutils.get_user_encoding())(f):
148
149
                    stripped_line = line.strip()
149
150
                    # strip empty line before the log message starts
150
151
                    if not started: