~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/msgeditor.py

  • Committer: ghigo
  • Date: 2007-08-17 18:00:34 UTC
  • mto: (2772.1.1 show-diff)
  • mto: This revision was merged to the branch mainline in revision 2773.
  • Revision ID: ghigo@venice-20070817180034-v2ypd6dz2nbh515i
small cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
103
103
    if not start_message is None:
104
104
        start_message = start_message.encode(bzrlib.user_encoding)
105
105
    return edit_commit_message_encoded(infotext.encode(bzrlib.user_encoding),
106
 
                               ignoreline,
107
 
                               start_message)
 
106
                                       ignoreline, start_message)
108
107
 
109
108
 
110
109
def edit_commit_message_encoded(infotext, ignoreline=DEFAULT_IGNORE_LINE,
237
236
 
238
237
 
239
238
def make_commit_message_template_encoded(working_tree, specific_files,
240
 
                                 diff=None,
241
 
                                 output_encoding=None):
 
239
                                         diff=None, output_encoding=None):
242
240
    """Prepare a template file for a commit into a branch.
243
241
 
244
242
    Returns an encoded string.
260
258
    if diff:
261
259
        stream = StringIO()
262
260
        show_diff_trees(working_tree.basis_tree(),
263
 
                working_tree, stream, specific_files,
264
 
                path_encoding=output_encoding)
 
261
                        working_tree, stream, specific_files,
 
262
                        path_encoding=output_encoding)
265
263
        template = template + '\n' + stream.getvalue()
266
264
 
267
265
    return template