~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/inventory_delta.py

  • Committer: Andrew Bennetts
  • Date: 2009-08-03 06:22:43 UTC
  • mto: This revision was merged to the branch mainline in revision 4608.
  • Revision ID: andrew.bennetts@canonical.com-20090803062243-dt2whm6cj9ftbfmf
Trap mistakes like passing key tuples (rather than id strs) into delta_to_lines sooner.

Show diffs side-by-side

added added

removed removed

Lines of Context:
171
171
            raise AssertionError(
172
172
                "Cannot serialise unless versioned_root/tree_references flags "
173
173
                "are both set.")
 
174
        if type(old_name) is not str:
 
175
            raise TypeError('old_name should be str, got %r' % (old_name,))
 
176
        if type(new_name) is not str:
 
177
            raise TypeError('new_name should be str, got %r' % (new_name,))
174
178
        lines = ['', '', '', '', '']
175
179
        to_line = self._delta_item_to_line
176
180
        for delta_item in delta_to_new: