/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-10-27 06:14:45 UTC
  • mfrom: (3793 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3795.
  • Revision ID: andrew.bennetts@canonical.com-20081027061445-eqt9lz6uw1mbvq4g
Merge from bzr.dev.

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: