~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_tree/__init__.py

  • Committer: Robert Collins
  • Date: 2009-07-29 04:57:50 UTC
  • mto: This revision was merged to the branch mainline in revision 4649.
  • Revision ID: robertc@robertcollins.net-20090729045750-qp1iw48rp7jyrfh2
Change the way iter_changes treats specific files to prevent InconsistentDeltas.

This is the internal core code that handles specific file operations like ``bzr st
FILENAME`` or ``bzr commit FILENAME``, and has been changed to include the
parent directories if they have altered, and when a directory stops being
a directory its children are always included.  This fixes a number of
causes for ``InconsistentDelta`` errors, and permits faster commit of
specific paths. (Robert Collins, #347649)

Show diffs side-by-side

added added

removed removed

Lines of Context:
201
201
        tt.apply()
202
202
        return self._convert_tree(tree, converter)
203
203
 
 
204
    def get_tree_no_parents_abc_content_7(self, tree, converter=None):
 
205
        """return a test tree with a, b/, d/e contents.
 
206
 
 
207
        This variation adds a dir 'd' ('d-id'), renames b to d/e.
 
208
        """
 
209
        self._make_abc_tree(tree)
 
210
        self.build_tree(['d/'], transport=tree.bzrdir.root_transport)
 
211
        tree.add(['d'], ['d-id'])
 
212
        tt = transform.TreeTransform(tree)
 
213
        trans_id = tt.trans_id_tree_path('b')
 
214
        parent_trans_id = tt.trans_id_tree_path('d')
 
215
        tt.adjust_path('e', parent_trans_id, trans_id)
 
216
        tt.apply()
 
217
        return self._convert_tree(tree, converter)
 
218
 
204
219
    def get_tree_with_subdirs_and_all_content_types(self):
205
220
        """Return a test tree with subdirs and all content types.
206
221
        See get_tree_with_subdirs_and_all_supported_content_types for details.