Rev 4478: Fixed as per John's review. in file:///home/vila/src/bzr/bugs/206577-send-strict/
Vincent Ladeuil
v.ladeuil+lp at free.fr
Wed Jul 1 16:17:33 BST 2009
At file:///home/vila/src/bzr/bugs/206577-send-strict/
------------------------------------------------------------
revno: 4478
revision-id: v.ladeuil+lp at free.fr-20090701151733-i34hbbl7e2e1ta2o
parent: v.ladeuil+lp at free.fr-20090701090258-pb7lsrdfmptc8s08
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 206577-send-strict
timestamp: Wed 2009-07-01 17:17:33 +0200
message:
Fixed as per John's review.
* bzrlib/tests/blackbox/test_send.py:
(load_tests): Delete spurious spaces in dict() definition.
(TestSendStrictWithChanges.setUp): Clarify the intent and mean of
the parametrization.
* bzrlib/send.py:
(send): Oops, fix the error messages.
-------------- next part --------------
=== modified file 'bzrlib/send.py'
--- a/bzrlib/send.py 2009-07-01 09:02:58 +0000
+++ b/bzrlib/send.py 2009-07-01 15:17:33 +0000
@@ -122,13 +122,13 @@
changes = tree.changes_from(tree.basis_tree())
if changes.has_changed() or len(tree.get_parent_ids()) > 1:
raise errors.UncommittedChanges(
- tree, more='Use --no-strict to force the push.')
+ tree, more='Use --no-strict to force the send.')
if tree.last_revision() != tree.branch.last_revision():
# The tree has lost sync with its branch, there is little
# chance that the user is aware of it but he can still force
# the push with --no-strict
raise errors.OutOfDateTree(
- tree, more='Use --no-strict to force the push.')
+ tree, more='Use --no-strict to force the send.')
revision_id = branch.last_revision()
if revision_id == NULL_REVISION:
raise errors.BzrCommandError('No revisions to submit.')
=== modified file 'bzrlib/tests/blackbox/test_send.py'
--- a/bzrlib/tests/blackbox/test_send.py 2009-07-01 07:20:36 +0000
+++ b/bzrlib/tests/blackbox/test_send.py 2009-07-01 15:17:33 +0000
@@ -39,11 +39,11 @@
)))
changes_scenarios = [
('uncommitted',
- dict(_changes_type= '_uncommitted_changes')),
+ dict(_changes_type='_uncommitted_changes')),
('pending_merges',
- dict(_changes_type= '_pending_merges')),
+ dict(_changes_type='_pending_merges')),
('out-of-sync-trees',
- dict(_changes_type= '_out_of_sync_trees')),
+ dict(_changes_type='_out_of_sync_trees')),
]
tests.multiply_tests(changes_tests, changes_scenarios, result)
# No parametrization for the remaining tests
@@ -363,7 +363,10 @@
def setUp(self):
super(TestSendStrictWithChanges, self).setUp()
- getattr(self, self._changes_type)()
+ # load tests set _changes_types to the name of the method we want to
+ # call now
+ do_changes_func = getattr(self, self._changes_type)
+ do_changes_func()
def _uncommitted_changes(self):
self.make_parent_and_local_branches()
More information about the bazaar-commits
mailing list