~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/shelf.py

  • Committer: Aaron Bentley
  • Date: 2009-03-08 01:32:37 UTC
  • mto: This revision was merged to the branch mainline in revision 4095.
  • Revision ID: aaron@aaronbentley.com-20090308013237-1gq0ezk3vej5kr20
Fix progress warning

Show diffs side-by-side

added added

removed removed

Lines of Context:
264
264
        tt.deserialize(records)
265
265
        return klass(tree, base_tree, tt, metadata.get('message'))
266
266
 
267
 
    def make_merger(self):
 
267
    def make_merger(self, task=None):
268
268
        """Return a merger that can unshelve the changes."""
269
 
        pb = ui.ui_factory.nested_progress_bar()
270
 
        try:
271
 
            target_tree = self.transform.get_preview_tree()
272
 
            merger = merge.Merger.from_uncommitted(self.tree, target_tree, pb,
273
 
                                                   self.base_tree)
274
 
            merger.merge_type = merge.Merge3Merger
275
 
            return merger
276
 
        finally:
277
 
            pb.finished()
 
269
        target_tree = self.transform.get_preview_tree()
 
270
        merger = merge.Merger.from_uncommitted(self.tree, target_tree,
 
271
            task, self.base_tree)
 
272
        merger.merge_type = merge.Merge3Merger
 
273
        return merger
278
274
 
279
275
    def finalize(self):
280
276
        """Release all resources held by this Unshelver."""