~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/shelf_ui.py

  • Committer: Martin Pool
  • Date: 2010-09-14 09:47:23 UTC
  • mto: (5452.4.1 jam-integration)
  • mto: This revision was merged to the branch mainline in revision 5476.
  • Revision ID: mbp@sourcefrog.net-20100914094723-2dn6e9q5ktpa1m8r
Update existing script tests to not ignore their output

Show diffs side-by-side

added added

removed removed

Lines of Context:
154
154
 
155
155
    @classmethod
156
156
    def from_args(klass, diff_writer, revision=None, all=False, file_list=None,
157
 
                  message=None, directory=None, destroy=False):
 
157
                  message=None, directory='.', destroy=False):
158
158
        """Create a shelver from commandline arguments.
159
159
 
160
160
        The returned shelver wil have a work_tree that is locked and should
168
168
        :param destroy: Change the working tree without storing the shelved
169
169
            changes.
170
170
        """
171
 
        if directory is None:
172
 
            directory = u'.'
173
 
        elif file_list:
174
 
            file_list = [osutils.pathjoin(directory, f) for f in file_list]
175
171
        tree, path = workingtree.WorkingTree.open_containing(directory)
176
172
        # Ensure that tree is locked for the lifetime of target_tree, as
177
173
        # target tree may be reading from the same dirstate.
497
493
        tt = tree_merger.make_preview_transform()
498
494
        new_tree = tt.get_preview_tree()
499
495
        if self.write_diff_to is None:
500
 
            self.write_diff_to = ui.ui_factory.make_output_stream(encoding_type='exact')
 
496
            self.write_diff_to = ui.ui_factory.make_output_stream()
501
497
        path_encoding = osutils.get_diff_header_encoding()
502
498
        diff.show_diff_trees(merger.this_tree, new_tree, self.write_diff_to,
503
499
            path_encoding=path_encoding)