~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/delta.py

  • Committer: Marius Kruger
  • Date: 2007-04-16 01:00:20 UTC
  • mto: This revision was merged to the branch mainline in revision 2455.
  • Revision ID: amanic@gmail.com-20070416010020-3jan8hje4qmbwdsh
* Add utility method delta.get_changes_as_text to get the output of .show()
  as a string.
* Add new errors.BzrRemoveChangedFilesError to raise when 'bzr remove'
  should refuse to delete stuff.
* Add workingtree.canicalpath(filename) to normalize file names.
* Changed the working of workingtree.remove(...) to check if any files
  are changed before it starts deleting anything. Will raise exception
  now if changed files are passed to be removed.
* workingtree_implementations/test_remove.py
  - Checked all tests and add more cases.

Show diffs side-by-side

added added

removed removed

Lines of Context:
195
195
            print >>to_file, 'unknown:'
196
196
            show_list(self.unversioned)
197
197
 
 
198
    def get_changes_as_text(self, show_ids=False, show_unchanged=False,
 
199
             short_status=False):
 
200
        import StringIO
 
201
        output = StringIO.StringIO()
 
202
        self.show(output, show_ids, show_unchanged, short_status)
 
203
        return output.getvalue()
198
204
 
199
205
@deprecated_function(zero_nine)
200
206
def compare_trees(old_tree, new_tree, want_unchanged=False,