Rev 4047: (robertc) Remove a wasted round trip determining the revno and revid in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Wed Feb 25 05:55:19 GMT 2009


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 4047
revision-id: pqm at pqm.ubuntu.com-20090225055516-t60b3kldpw95bn1a
parent: pqm at pqm.ubuntu.com-20090225051539-61fkvmey7t598fzs
parent: robertc at robertcollins.net-20090225050651-q8g8zdj5esyn2yel
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Wed 2009-02-25 05:55:16 +0000
message:
  (robertc) Remove a wasted round trip determining the revno and revid
  	of a newly created RemoteBranch. (Robert Collins)
modified:
  bzrlib/remote.py               remote.py-20060720103555-yeeg2x51vn0rbtdp-1
  bzrlib/tests/blackbox/test_push.py test_push.py-20060329002750-929af230d5d22663
    ------------------------------------------------------------
    revno: 4044.1.4
    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:
      bzrlib/remote.py               remote.py-20060720103555-yeeg2x51vn0rbtdp-1
      bzrlib/tests/blackbox/test_push.py test_push.py-20060329002750-929af230d5d22663
=== 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