~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/shelf_ui.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-06-26 04:45:19 UTC
  • mfrom: (4465.1.3 vpipe)
  • Revision ID: pqm@pqm.ubuntu.com-20090626044519-uc47aufeyqmml40o
(abentley) Refactor code to allow easier reuse by bzr-pipeline

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
 
58
58
    def __init__(self, work_tree, target_tree, diff_writer=None, auto=False,
59
59
                 auto_apply=False, file_list=None, message=None,
60
 
                 destroy=False, reporter=None):
 
60
                 destroy=False, manager=None, reporter=None):
61
61
        """Constructor.
62
62
 
63
63
        :param work_tree: The working tree to shelve changes from.
69
69
        :param message: The message to associate with the shelved changes.
70
70
        :param destroy: Change the working tree without storing the shelved
71
71
            changes.
 
72
        :param manager: The shelf manager to use.
72
73
        """
73
74
        self.work_tree = work_tree
74
75
        self.target_tree = target_tree
75
76
        self.diff_writer = diff_writer
76
77
        if self.diff_writer is None:
77
78
            self.diff_writer = sys.stdout
78
 
        self.manager = work_tree.get_shelf_manager()
 
79
        if manager is None:
 
80
            manager = work_tree.get_shelf_manager()
 
81
        self.manager = manager
79
82
        self.auto = auto
80
83
        self.auto_apply = auto_apply
81
84
        self.file_list = file_list