/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@3883

Show diffs side-by-side

added added

removed removed

Lines of Context:
977
977
                                            possible_transports=[to_transport],
978
978
                                            accelerator_tree=accelerator_tree,
979
979
                                            hardlink=hardlink, stacked=stacked,
980
 
                                            force_new_repo=standalone)
 
980
                                            force_new_repo=standalone,
 
981
                                            source_branch=br_from)
981
982
                branch = dir.open_branch()
982
983
            except errors.NoSuchRevision:
983
984
                to_transport.delete_tree('.')
2374
2375
        )
2375
2376
        from bzrlib.msgeditor import (
2376
2377
            edit_commit_message_encoded,
 
2378
            generate_commit_message_template,
2377
2379
            make_commit_message_template_encoded
2378
2380
        )
2379
2381
 
2408
2410
                t = make_commit_message_template_encoded(tree,
2409
2411
                        selected_list, diff=show_diff,
2410
2412
                        output_encoding=osutils.get_user_encoding())
2411
 
                my_message = edit_commit_message_encoded(t)
 
2413
                start_message = generate_commit_message_template(commit_obj)
 
2414
                my_message = edit_commit_message_encoded(t, 
 
2415
                    start_message=start_message)
2412
2416
                if my_message is None:
2413
2417
                    raise errors.BzrCommandError("please specify a commit"
2414
2418
                        " message with either --message or --file")
4746
4750
 
4747
4751
    You can put multiple items on the shelf, and by default, 'unshelve' will
4748
4752
    restore the most recently shelved changes.
4749
 
 
4750
 
    While you have patches on the shelf you can view and manipulate them with
4751
 
    the 'shelf' command. Run 'bzr shelf -h' for more info.
4752
4753
    """
4753
4754
 
4754
4755
    takes_args = ['file*']
4757
4758
        'revision',
4758
4759
        Option('all', help='Shelve all changes.'),
4759
4760
        'message',
 
4761
        RegistryOption('writer', 'Method to use for writing diffs.',
 
4762
                       bzrlib.option.diff_writer_registry,
 
4763
                       value_switches=True, enum_switch=False)
4760
4764
    ]
4761
4765
    _see_also = ['unshelve']
4762
4766
 
4763
 
    def run(self, revision=None, all=False, file_list=None, message=None):
 
4767
    def run(self, revision=None, all=False, file_list=None, message=None,
 
4768
            writer=None):
4764
4769
        from bzrlib.shelf_ui import Shelver
 
4770
        if writer is None:
 
4771
            writer = bzrlib.option.diff_writer_registry.get()
4765
4772
        try:
4766
 
            Shelver.from_args(revision, all, file_list, message).run()
 
4773
            Shelver.from_args(writer(sys.stdout), revision, all, file_list,
 
4774
                              message).run()
4767
4775
        except errors.UserAbort:
4768
4776
            return 0
4769
4777