/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/builtins.py

[merge] bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
1249
1249
                StrictCommitFailed)
1250
1250
        from bzrlib.msgeditor import edit_commit_message
1251
1251
        from bzrlib.status import show_status
1252
 
        from cStringIO import StringIO
 
1252
        from tempfile import TemporaryFile
 
1253
        import codecs
1253
1254
 
 
1255
        # TODO: do more checks that the commit will succeed before 
 
1256
        # spending the user's valuable time typing a commit message.
 
1257
        #
 
1258
        # TODO: if the commit *does* happen to fail, then save the commit 
 
1259
        # message to a temporary file where it can be recovered
1254
1260
        tree, selected_list = tree_files(selected_list)
1255
1261
        if message is None and not file:
1256
 
            catcher = StringIO()
1257
 
            show_status(tree.branch, specific_files=selected_list,
1258
 
                        to_file=catcher)
1259
 
            message = edit_commit_message(catcher.getvalue())
1260
 
 
 
1262
            template = make_commit_message_template(tree)
 
1263
            message = edit_commit_message(template)
1261
1264
            if message is None:
1262
1265
                raise BzrCommandError("please specify a commit message"
1263
1266
                                      " with either --message or --file")