~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/send.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:
115
115
                    ).get_user_option_as_bool('send_strict')
116
116
            if strict is None: strict = True # default value
117
117
            if strict and tree is not None:
118
 
                if (tree.has_changes()):
 
118
                if (tree.has_changes(tree.basis_tree())
 
119
                    or len(tree.get_parent_ids()) > 1):
119
120
                    raise errors.UncommittedChanges(
120
121
                        tree, more='Use --no-strict to force the send.')
121
122
                if tree.last_revision() != tree.branch.last_revision():
122
123
                    # The tree has lost sync with its branch, there is little
123
124
                    # chance that the user is aware of it but he can still force
124
 
                    # the send with --no-strict
 
125
                    # the push with --no-strict
125
126
                    raise errors.OutOfDateTree(
126
127
                        tree, more='Use --no-strict to force the send.')
127
128
            revision_id = branch.last_revision()