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

  • Committer: Benoît Pierre
  • Date: 2009-11-02 21:56:42 UTC
  • mto: (4603.1.22 shelve-editor)
  • mto: This revision was merged to the branch mainline in revision 4795.
  • Revision ID: benoit.pierre@gmail.com-20091102215642-t5fforovkpj3zqla
Lock the work tree in Shelver only after everything else has been setup.

This avoid having to use break-lock if a crash occurs during initialization,
for example due to an invalid 'change_editor' entry in ~/.bazaar/bazaar.conf.

Show diffs side-by-side

added added

removed removed

Lines of Context:
133
133
        :param manager: The shelf manager to use.
134
134
        :param reporter: Object for reporting changes to user.
135
135
        """
136
 
        work_tree.lock_tree_write()
137
136
        self.work_tree = work_tree
138
137
        self.target_tree = target_tree
139
138
        self.diff_writer = diff_writer
152
151
        self.reporter = reporter
153
152
        config = self.work_tree.branch.get_config()
154
153
        self.change_editor = config.get_change_editor(target_tree, work_tree)
 
154
        self.work_tree.lock_tree_write()
155
155
 
156
156
    @classmethod
157
157
    def from_args(klass, diff_writer, revision=None, all=False, file_list=None,