/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/msgeditor.py

  • Committer: Andrew Bennetts
  • Date: 2008-02-18 08:30:38 UTC
  • mto: This revision was merged to the branch mainline in revision 3756.
  • Revision ID: andrew.bennetts@canonical.com-20080218083038-tts55zsx5xrz3l2e
Lots of assorted hackery to reduce the number of imports for common operations.  Improves 'rocks', 'st' and 'help' times by ~50ms on my laptop.

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
26
import bzrlib.config as config
28
27
from bzrlib import osutils
29
28
from bzrlib.errors import BzrError, BadCommitMessageEncoding
102
101
    """
103
102
 
104
103
    if not start_message is None:
105
 
        start_message = start_message.encode(bzrlib.user_encoding)
106
 
    infotext = infotext.encode(bzrlib.user_encoding, 'replace')
 
104
        start_message = start_message.encode(osutils.get_user_encoding())
 
105
    infotext = infotext.encode(osutils.get_user_encoding(), 'replace')
107
106
    return edit_commit_message_encoded(infotext, ignoreline, start_message)
108
107
 
109
108
 
144
143
        f = file(msgfilename, 'rU')
145
144
        try:
146
145
            try:
147
 
                for line in codecs.getreader(bzrlib.user_encoding)(f):
 
146
                for line in codecs.getreader(osutils.get_user_encoding())(f):
148
147
                    stripped_line = line.strip()
149
148
                    # strip empty line before the log message starts
150
149
                    if not started: