Rev 4048: Remove a wasted round trip determining the revno and revid of a newly created branch. in http://people.ubuntu.com/~robertc/baz2.0/push.roundtrips
Robert Collins
robertc at robertcollins.net
Wed Feb 25 05:06:54 GMT 2009
At http://people.ubuntu.com/~robertc/baz2.0/push.roundtrips
------------------------------------------------------------
revno: 4048
revision-id: robertc at robertcollins.net-20090225050651-q8g8zdj5esyn2yel
parent: robertc at robertcollins.net-20090225042842-jwojup508avng2hc
committer: Robert Collins <robertc at robertcollins.net>
branch nick: push.roundtrips
timestamp: Wed 2009-02-25 16:06:51 +1100
message:
Remove a wasted round trip determining the revno and revid of a newly created branch.
=== modified file 'bzrlib/remote.py'
--- a/bzrlib/remote.py 2009-02-25 04:28:42 +0000
+++ b/bzrlib/remote.py 2009-02-25 05:06:51 +0000
@@ -1572,6 +1572,10 @@
remote_repo = RemoteRepository(repo_bzrdir, repo_format)
remote_branch = RemoteBranch(a_bzrdir, remote_repo,
format=format, setup_stacking=False)
+ # XXX: We know this is a new branch, so it must have revno 0, revid
+ # NULL_REVISION. Creating the branch locked would make this be unable
+ # to be wrong; here its simply very unlikely to be wrong. RBC 20090225
+ remote_branch._last_revision_info_cache = 0, NULL_REVISION
return remote_branch
def supports_tags(self):
=== modified file 'bzrlib/tests/blackbox/test_push.py'
--- a/bzrlib/tests/blackbox/test_push.py 2009-02-25 04:28:42 +0000
+++ b/bzrlib/tests/blackbox/test_push.py 2009-02-25 05:06:51 +0000
@@ -202,7 +202,7 @@
# being too low. If rpc_count increases, more network roundtrips have
# become necessary for this use case. Please do not adjust this number
# upwards without agreement from bzr's network support maintainers.
- self.assertEqual(29, rpc_count)
+ self.assertEqual(28, rpc_count)
def test_push_smart_stacked_streaming_acceptance(self):
self.setup_smart_server_with_call_log()
@@ -219,7 +219,7 @@
# being too low. If rpc_count increases, more network roundtrips have
# become necessary for this use case. Please do not adjust this number
# upwards without agreement from bzr's network support maintainers.
- self.assertEqual(56, rpc_count)
+ self.assertEqual(55, rpc_count)
remote = Branch.open('public')
self.assertEndsWith(remote.get_stacked_on_url(), '/parent')
More information about the bazaar-commits
mailing list