Rev 4541: Fix NEWS conflicts. in http://people.ubuntu.com/~robertc/baz2.0/integration
Robert Collins
robertc at robertcollins.net
Thu Jul 16 09:00:12 BST 2009
At http://people.ubuntu.com/~robertc/baz2.0/integration
------------------------------------------------------------
revno: 4541 [merge]
revision-id: robertc at robertcollins.net-20090716080003-bj11ua16u77xvsvx
parent: robertc at robertcollins.net-20090716013657-6f1046zvotn9shm3
parent: pqm at pqm.ubuntu.com-20090716074221-a8ydf0c5tg54k35c
committer: Robert Collins <robertc at robertcollins.net>
branch nick: integration
timestamp: Thu 2009-07-16 18:00:03 +1000
message:
Fix NEWS conflicts.
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/bzrdir.py bzrdir.py-20060131065624-156dfea39c4387cb
bzrlib/tests/test_remote.py test_remote.py-20060720103555-yeeg2x51vn0rbtdp-2
=== modified file 'NEWS'
--- a/NEWS 2009-07-16 01:36:57 +0000
+++ b/NEWS 2009-07-16 08:00:03 +0000
@@ -33,6 +33,9 @@
* ``bzr mv`` no longer takes out branch locks, which allows it to work
when the branch is readonly. (Robert Collins, #216541)
+* Fixed spurious "Source branch does not support stacking" warning when
+ pushing. (Andrew Bennetts, #388908)
+
* ``WorkingTree4.unversion`` will no longer fail to unversion ids which
were present in a parent tree but renamed in the working tree.
(Robert Collins, #187207)
=== modified file 'bzrlib/bzrdir.py'
--- a/bzrlib/bzrdir.py 2009-07-01 10:49:05 +0000
+++ b/bzrlib/bzrdir.py 2009-07-16 04:56:26 +0000
@@ -3269,6 +3269,7 @@
else:
remote_repo = None
policy = None
+ bzrdir._format.set_branch_format(self.get_branch_format())
if require_stacking:
# The repo has already been created, but we need to make sure that
# we'll make a stackable branch.
=== modified file 'bzrlib/tests/test_remote.py'
--- a/bzrlib/tests/test_remote.py 2009-06-17 03:53:51 +0000
+++ b/bzrlib/tests/test_remote.py 2009-07-16 05:22:50 +0000
@@ -341,6 +341,10 @@
request_handlers.register(verb, orig_method)
self.addCleanup(restoreVerb)
+ def assertFinished(self, fake_client):
+ """Assert that all of a FakeClient's expected calls have occurred."""
+ fake_client.finished_test()
+
class Test_ClientMedium_remote_path_from_transport(tests.TestCase):
"""Tests for the behaviour of client_medium.remote_path_from_transport."""
@@ -446,7 +450,7 @@
self.assertEqual(bzrdir.BzrDirMetaFormat1, type(result))
self.assertEqual(expected._repository_format, result._repository_format)
self.assertEqual(expected._branch_format, result._branch_format)
- client.finished_test()
+ self.assertFinished(client)
def test_current_server(self):
transport = self.get_transport('.')
@@ -467,7 +471,7 @@
self.assertEqual(bzrdir.BzrDirMetaFormat1, type(result))
self.assertEqual(None, result._repository_format)
self.assertEqual(None, result._branch_format)
- client.finished_test()
+ self.assertFinished(client)
class TestBzrDirOpenBranch(TestRemote):
@@ -506,7 +510,7 @@
result = bzrdir.open_branch()
self.assertIsInstance(result, RemoteBranch)
self.assertEqual(bzrdir, result.bzrdir)
- client.finished_test()
+ self.assertFinished(client)
def test_branch_missing(self):
transport = MemoryTransport()
@@ -559,7 +563,7 @@
bzrdir = RemoteBzrDir(transport, remote.RemoteBzrDirFormat(),
_client=client)
result = bzrdir.open_branch()
- client.finished_test()
+ self.assertFinished(client)
def check_open_repository(self, rich_root, subtrees, external_lookup='no'):
reference_format = self.get_repo_format()
@@ -779,7 +783,7 @@
# transport connected to a real server.
result = fmt._initialize_on_transport_ex_rpc(client, 'path',
transport, False, False, False, None, None, None, None, False)
- client.finished_test()
+ self.assertFinished(client)
def test_error(self):
"""Error responses are translated, e.g. 'PermissionDenied' raises the
@@ -803,7 +807,7 @@
False, False, False, None, None, None, None, False)
self.assertEqual('path', err.path)
self.assertEqual(': extra info', err.extra)
- client.finished_test()
+ self.assertFinished(client)
def test_error_from_real_server(self):
"""Integration test for error translation."""
@@ -884,7 +888,7 @@
transport = transport.clone('quack')
branch = self.make_remote_branch(transport, client)
result = branch.get_parent()
- client.finished_test()
+ self.assertFinished(client)
self.assertEqual(None, result)
def test_parent_relative(self):
@@ -916,7 +920,7 @@
branch = self.make_remote_branch(transport, client)
result = branch.get_parent()
self.assertEqual('http://foo/', result)
- client.finished_test()
+ self.assertFinished(client)
class TestBranchSetParentLocation(RemoteBranchTestCase):
@@ -937,7 +941,7 @@
branch._lock_token = 'b'
branch._repo_lock_token = 'r'
branch._set_parent_location(None)
- client.finished_test()
+ self.assertFinished(client)
def test_parent(self):
transport = MemoryTransport()
@@ -954,7 +958,7 @@
branch._lock_token = 'b'
branch._repo_lock_token = 'r'
branch._set_parent_location('foo')
- client.finished_test()
+ self.assertFinished(client)
def test_backwards_compat(self):
self.setup_smart_server_with_call_log()
@@ -992,7 +996,7 @@
transport = transport.clone('quack')
branch = self.make_remote_branch(transport, client)
result = branch.tags.get_tag_dict()
- client.finished_test()
+ self.assertFinished(client)
self.assertEqual({}, result)
@@ -1012,7 +1016,7 @@
transport = transport.clone('quack')
branch = self.make_remote_branch(transport, client)
result = branch.last_revision_info()
- client.finished_test()
+ self.assertFinished(client)
self.assertEqual((0, NULL_REVISION), result)
def test_non_empty_branch(self):
@@ -1093,7 +1097,7 @@
branch = bzrdir.open_branch()
result = branch.get_stacked_on_url()
self.assertEqual('../base', result)
- client.finished_test()
+ self.assertFinished(client)
# it's in the fallback list both for the RemoteRepository and its vfs
# repository
self.assertEqual(1, len(branch.repository._fallback_repositories))
@@ -1126,7 +1130,7 @@
branch = bzrdir.open_branch()
result = branch.get_stacked_on_url()
self.assertEqual('../base', result)
- client.finished_test()
+ self.assertFinished(client)
# it's in the fallback list both for the RemoteRepository.
self.assertEqual(1, len(branch.repository._fallback_repositories))
# And we haven't had to construct a real repository.
@@ -1167,7 +1171,7 @@
result = branch.set_revision_history([])
branch.unlock()
self.assertEqual(None, result)
- client.finished_test()
+ self.assertFinished(client)
def test_set_nonempty(self):
# set_revision_history([rev-id1, ..., rev-idN]) is translated to calling
@@ -1205,7 +1209,7 @@
result = branch.set_revision_history(['rev-id1', 'rev-id2'])
branch.unlock()
self.assertEqual(None, result)
- client.finished_test()
+ self.assertFinished(client)
def test_no_such_revision(self):
transport = MemoryTransport()
@@ -1240,7 +1244,7 @@
self.assertRaises(
errors.NoSuchRevision, branch.set_revision_history, ['rev-id'])
branch.unlock()
- client.finished_test()
+ self.assertFinished(client)
def test_tip_change_rejected(self):
"""TipChangeRejected responses cause a TipChangeRejected exception to
@@ -1283,7 +1287,7 @@
self.assertIsInstance(err.msg, unicode)
self.assertEqual(rejection_msg_unicode, err.msg)
branch.unlock()
- client.finished_test()
+ self.assertFinished(client)
class TestBranchSetLastRevisionInfo(RemoteBranchTestCase):
@@ -1399,7 +1403,7 @@
self.assertEqual(
[('set_last_revision_info', 1234, 'a-revision-id')],
real_branch.calls)
- client.finished_test()
+ self.assertFinished(client)
def test_unexpected_error(self):
# If the server sends an error the client doesn't understand, it gets
@@ -1513,7 +1517,7 @@
config = branch._get_config()
config.set_option('foo', 'bar')
branch.unlock()
- client.finished_test()
+ self.assertFinished(client)
def test_backwards_compat_set_option(self):
self.setup_smart_server_with_call_log()
@@ -1543,7 +1547,7 @@
transport = transport.clone('quack')
branch = self.make_remote_branch(transport, client)
self.assertRaises(errors.UnlockableTransport, branch.lock_write)
- client.finished_test()
+ self.assertFinished(client)
class TestBzrDirGetSetConfig(RemoteBzrDirTestCase):
@@ -2045,7 +2049,7 @@
'success', ('ok', 'rev-five'))
result = repo.get_rev_id_for_revno(5, (42, 'rev-foo'))
self.assertEqual((True, 'rev-five'), result)
- client.finished_test()
+ self.assertFinished(client)
def test_history_incomplete(self):
repo, client = self.setup_fake_client_and_repository('quack')
@@ -2054,7 +2058,7 @@
'success', ('history-incomplete', 10, 'rev-ten'))
result = repo.get_rev_id_for_revno(5, (42, 'rev-foo'))
self.assertEqual((False, (10, 'rev-ten')), result)
- client.finished_test()
+ self.assertFinished(client)
def test_history_incomplete_with_fallback(self):
"""A 'history-incomplete' response causes the fallback repository to be
@@ -2080,7 +2084,7 @@
'success', ('ok', 'rev-one'))
result = repo.get_rev_id_for_revno(1, (42, 'rev-foo'))
self.assertEqual((True, 'rev-one'), result)
- client.finished_test()
+ self.assertFinished(client)
def test_nosuchrevision(self):
# 'nosuchrevision' is returned when the known-revid is not found in the
@@ -2092,7 +2096,7 @@
self.assertRaises(
errors.NoSuchRevision,
repo.get_rev_id_for_revno, 5, (42, 'rev-foo'))
- client.finished_test()
+ self.assertFinished(client)
class TestRepositoryIsShared(TestRemoteRepository):
@@ -2231,7 +2235,7 @@
resume_tokens, missing_keys = sink.insert_stream([], fmt, [])
self.assertEqual([], resume_tokens)
self.assertEqual(set(), missing_keys)
- client.finished_test()
+ self.assertFinished(client)
def test_locked_repo_with_no_lock_token(self):
transport_path = 'quack'
@@ -2251,7 +2255,7 @@
resume_tokens, missing_keys = sink.insert_stream([], fmt, [])
self.assertEqual([], resume_tokens)
self.assertEqual(set(), missing_keys)
- client.finished_test()
+ self.assertFinished(client)
def test_locked_repo_with_lock_token(self):
transport_path = 'quack'
@@ -2271,7 +2275,7 @@
resume_tokens, missing_keys = sink.insert_stream([], fmt, [])
self.assertEqual([], resume_tokens)
self.assertEqual(set(), missing_keys)
- client.finished_test()
+ self.assertFinished(client)
class TestRepositoryTarball(TestRemoteRepository):
@@ -2362,7 +2366,7 @@
client.add_expected_call(
'PackRepository.autopack', ('quack/',), 'success', ('ok',))
repo.autopack()
- client.finished_test()
+ self.assertFinished(client)
def test_ok_with_real_repo(self):
"""When the server returns 'ok' and there is a _real_repository, then
More information about the bazaar-commits
mailing list