~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/reconfigure.py

  • Committer: John Arbash Meinel
  • Date: 2009-09-24 19:26:45 UTC
  • mto: (4634.52.3 2.0)
  • mto: This revision was merged to the branch mainline in revision 4716.
  • Revision ID: john@arbash-meinel.com-20090924192645-hyy1ycnnk6u3j5j6
Catch a corner case that we were missing.
The CHKInventory tests were passing, but failed for test_inv because
we were passing None to _getitems(). That only failed for InternalNodes,
but we were using a structure that didn't have internal nodes.
So now the test is parameterized on a small CHKInventory page size
to force those things out into the open.

Show diffs side-by-side

added added

removed removed

Lines of Context:
265
265
 
266
266
    def _check(self):
267
267
        """Raise if reconfiguration would destroy local changes"""
268
 
        if self._destroy_tree and self.tree.has_changes():
 
268
        if self._destroy_tree:
 
269
            # XXX: What about pending merges ? -- vila 20090629
 
270
            if self.tree.has_changes(self.tree.basis_tree()):
269
271
                raise errors.UncommittedChanges(self.tree)
270
272
        if self._create_reference and self.local_branch is not None:
271
273
            reference_branch = branch.Branch.open(self._select_bind_location())