Rev 2660: (John Arbash Meinel) remove a spurious get_master_branch() call, to avoid 1 extra remote connection in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Mon Jul 30 19:19:21 BST 2007
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 2660
revision-id: pqm at pqm.ubuntu.com-20070730181918-3i2gb12zxmvjwh3r
parent: pqm at pqm.ubuntu.com-20070730051419-0jdj7g8fm4iuoz7h
parent: john at arbash-meinel.com-20070730170648-9agmhx8qdv0tna1g
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Mon 2007-07-30 19:19:18 +0100
message:
(John Arbash Meinel) remove a spurious get_master_branch() call, to avoid 1 extra remote connection
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/builtins.py builtins.py-20050830033751-fc01482b9ca23183
bzrlib/smart/protocol.py protocol.py-20061108035435-ot0lstk2590yqhzr-1
bzrlib/transport/remote.py ssh.py-20060608202016-c25gvf1ob7ypbus6-1
------------------------------------------------------------
revno: 2655.1.4
merged: john at arbash-meinel.com-20070730170648-9agmhx8qdv0tna1g
parent: john at arbash-meinel.com-20070730170502-t13pxmv7kygd6qpm
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: remove_extra_connect
timestamp: Mon 2007-07-30 12:06:48 -0500
message:
NEWS entry for update, partial fix for bug #128076
------------------------------------------------------------
revno: 2655.1.3
merged: john at arbash-meinel.com-20070730170502-t13pxmv7kygd6qpm
parent: john at arbash-meinel.com-20070730143604-aigt4pksc8hop053
parent: pqm at pqm.ubuntu.com-20070730051419-0jdj7g8fm4iuoz7h
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: remove_extra_connect
timestamp: Mon 2007-07-30 12:05:02 -0500
message:
[merge] bzr.dev 2659
------------------------------------------------------------
revno: 2655.1.2
merged: john at arbash-meinel.com-20070730143604-aigt4pksc8hop053
parent: john at arbash-meinel.com-20070727194103-xj3g89nsqnxsiwpq
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: remove_extra_connect
timestamp: Mon 2007-07-30 09:36:04 -0500
message:
Remove the extra traceback.
------------------------------------------------------------
revno: 2655.1.1
merged: john at arbash-meinel.com-20070727194103-xj3g89nsqnxsiwpq
parent: pqm at pqm.ubuntu.com-20070727061532-14ly852y2g2dbcb8
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: remove_extra_connect
timestamp: Fri 2007-07-27 14:41:03 -0500
message:
Add some more hpss logging.
Also, remove a spurious call to 'get_master_branch()' as part of 'bzr update'
=== modified file 'NEWS'
--- a/NEWS 2007-07-30 03:25:03 +0000
+++ b/NEWS 2007-07-30 17:06:48 +0000
@@ -99,6 +99,11 @@
the file starts with ``callgrind.out``. This matches the default file
filtering done by KCacheGrind's Open Dialog. (Ian Clatworthy)
+ * Fix ``bzr update`` to avoid an unnecessary
+ ``branch.get_master_branch`` call, which avoids 1 extra connection
+ to the remote server. (Partial fix for #128076, John Arbash Meinel)
+
+
LIBRARY API BREAKS:
* Deprecated dictionary ``bzrlib.option.SHORT_OPTIONS`` removed.
=== modified file 'bzrlib/builtins.py'
--- a/bzrlib/builtins.py 2007-07-26 19:51:56 +0000
+++ b/bzrlib/builtins.py 2007-07-30 17:05:02 +0000
@@ -1029,7 +1029,6 @@
if last_rev == _mod_revision.ensure_null(
tree.branch.last_revision()):
# may be up to date, check master too.
- master = tree.branch.get_master_branch()
if master is None or last_rev == _mod_revision.ensure_null(
master.last_revision()):
revno = tree.branch.revision_id_to_revno(last_rev)
=== modified file 'bzrlib/smart/protocol.py'
--- a/bzrlib/smart/protocol.py 2007-07-09 05:56:41 +0000
+++ b/bzrlib/smart/protocol.py 2007-07-27 19:41:03 +0000
@@ -302,7 +302,7 @@
def call(self, *args):
if 'hpss' in debug.debug_flags:
- mutter('hpss call: %r', args)
+ mutter('hpss call: %r', args)
self._write_args(args)
self._request.finished_writing()
=== modified file 'bzrlib/transport/remote.py'
--- a/bzrlib/transport/remote.py 2007-07-20 18:59:29 +0000
+++ b/bzrlib/transport/remote.py 2007-07-30 14:36:04 +0000
@@ -27,7 +27,9 @@
import urlparse
from bzrlib import (
+ debug,
errors,
+ trace,
transport,
urlutils,
)
@@ -105,8 +107,11 @@
credentials = None
if medium is None:
medium, credentials = self._build_medium()
- self._shared_connection= transport._SharedConnection(medium,
- credentials)
+ if 'hpss' in debug.debug_flags:
+ trace.mutter('hpss: Built a new medium: %s',
+ medium.__class__.__name__)
+ self._shared_connection = transport._SharedConnection(medium,
+ credentials)
if _client is None:
self._client = client._SmartClient(self.get_shared_medium())
More information about the bazaar-commits
mailing list