Rev 2886: Fix #140432 by handling the fixes parameter default value in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Thu Oct 4 17:38:30 BST 2007


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

------------------------------------------------------------
revno: 2886
revision-id: pqm at pqm.ubuntu.com-20071004163827-t91s0epirx172rab
parent: pqm at pqm.ubuntu.com-20071004071214-i0icltanhq59qtwt
parent: v.ladeuil+lp at free.fr-20071004154844-6an068lo9akzt2oh
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Thu 2007-10-04 17:38:27 +0100
message:
  Fix #140432 by handling the fixes parameter default value
added:
  bzrlib/tests/commands/test_commit.py test_commit.py-20070913161801-ydrx2k5gmv7k7eiu-1
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/branch.py               branch.py-20050309040759-e4baf4e0d046576e
  bzrlib/builtins.py             builtins.py-20050830033751-fc01482b9ca23183
  bzrlib/tests/commands/__init__.py __init__.py-20070520095518-ecfl8531fxgjeycj-1
  bzrlib/tests/commands/test_branch.py test_branch.py-20070520173042-ou3a796w3xn1y8ps-1
  bzrlib/tests/commands/test_cat.py test_cat.py-20070525170351-vg2apsfb5j413913-1
  bzrlib/tests/commands/test_checkout.py test_checkout.py-20070525151718-vm7ligd5px5dtmda-1
  bzrlib/tests/commands/test_init.py test_init.py-20070514074921-audbcdd8o56dpame-1
  bzrlib/tests/commands/test_init_repository.py test_init_repository-20070525163812-87xw0678ky573l27-1
  bzrlib/tests/commands/test_merge.py test_merge.py-20070525163813-v8yfs5wu77hjsx0o-1
  bzrlib/tests/commands/test_missing.py test_missing.py-20070525171057-qr1z4sleurlp9b5v-1
  bzrlib/tests/commands/test_pull.py test_pull.py-20070525144918-cgmunk4ici2krjnd-1
  bzrlib/tests/commands/test_push.py test_push.py-20070525122003-gc1ob0ea0nueoqgj-1
  bzrlib/tests/commands/test_update.py test_update.py-20070910091045-8uyp8v73j926l1g2-1
  bzrlib/tests/transport_util.py transportutil.py-20070525113600-5v2igk89s8fensom-1
  bzrlib/workingtree.py          workingtree.py-20050511021032-29b6ec0a681e02e3
    ------------------------------------------------------------
    revno: 2885.1.1
    merged: v.ladeuil+lp at free.fr-20071004154844-6an068lo9akzt2oh
    parent: pqm at pqm.ubuntu.com-20071004071214-i0icltanhq59qtwt
    parent: v.ladeuil+lp at free.fr-20071004154521-vrh7xxt3vrbuq8nq
    committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
    branch nick: trunk
    timestamp: Thu 2007-10-04 17:48:44 +0200
    message:
      Fix #140432 by handling the fixes parameter default value
    ------------------------------------------------------------
    revno: 2885.2.2
    merged: v.ladeuil+lp at free.fr-20071004154521-vrh7xxt3vrbuq8nq
    parent: v.ladeuil+lp at free.fr-20071004153537-zr8vmcjln9zfi73v
    committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
    branch nick: 140432
    timestamp: Thu 2007-10-04 17:45:21 +0200
    message:
      Review comments.
    ------------------------------------------------------------
    revno: 2885.2.1
    merged: v.ladeuil+lp at free.fr-20071004153537-zr8vmcjln9zfi73v
    parent: pqm at pqm.ubuntu.com-20071004071214-i0icltanhq59qtwt
    parent: v.ladeuil+lp at free.fr-20070924160129-7cjzoainjvfiu20k
    committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
    branch nick: 140432
    timestamp: Thu 2007-10-04 17:35:37 +0200
    message:
      merge bzr.dev
    ------------------------------------------------------------
    revno: 2817.4.6
    merged: v.ladeuil+lp at free.fr-20070924160129-7cjzoainjvfiu20k
    parent: v.ladeuil+lp at free.fr-20070924150126-nll7i0385kisklyj
    committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
    branch nick: connection.sharing
    timestamp: Mon 2007-09-24 18:01:29 +0200
    message:
      Fix #140432 by handling the 'fixes' parameter default value.
      
      * NEWS: 
      Mentions that bug #140432 was fixed.
    ------------------------------------------------------------
    revno: 2817.4.5
    merged: v.ladeuil+lp at free.fr-20070924150126-nll7i0385kisklyj
    parent: v.ladeuil+lp at free.fr-20070924145902-hjkk5u3lnbhvdzlz
    parent: pqm at pqm.ubuntu.com-20070924114153-9j0aboyxyah6sv2c
    committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
    branch nick: connection.sharing
    timestamp: Mon 2007-09-24 17:01:26 +0200
    message:
      Merge bzr.dev
    ------------------------------------------------------------
    revno: 2817.4.4
    merged: v.ladeuil+lp at free.fr-20070924145902-hjkk5u3lnbhvdzlz
    parent: v.ladeuil+lp at free.fr-20070918200421-9e5bkyohebe2h0eg
    committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
    branch nick: connection.sharing
    timestamp: Mon 2007-09-24 16:59:02 +0200
    message:
      Redo the lost modification.
      
      * bzrlib/builtins.py (cmd_commit.run): Rework 'fixes' default
      value handling.
    ------------------------------------------------------------
    revno: 2817.4.3
    merged: v.ladeuil+lp at free.fr-20070918200421-9e5bkyohebe2h0eg
    parent: v.ladeuil+lp at free.fr-20070913161227-commdhgkj4nzzi7n
    committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
    branch nick: bzr.connection.sharing
    timestamp: Tue 2007-09-18 22:04:21 +0200
    message:
      Add tests for commit, reuse master branch transport.
      
      * bzrlib/workingtree.py:
      (WorkingTree.pull): Add a possible_transports parameter, forward
      it to branch.pull.
      
      * bzrlib/branch.py:
      (Branch.pull, BzrBranch.pull, BzrBranch5.pull): Add a
      possible_transports parameter.
      (BzrBranch5.pull): Make master branch transport added to
      possible_transports
      
      * bzrlib/tests/commands/test_commit.py: 
      New file testing against multiple connections during commit.
      
      * bzrlib/builtins.py:
      (cmd_pull.run): Allows master branch transports to be reused.
      (cmd_commit): 'fixes' is a ListOption, its default value should
      be [].
      
      
      * bzrlib/tests/commands/test_pull.py: 
      Fix import statements.
      (TestPull.test_pull_with_bound_branch): New test.
      
      * bzrlib/tests/commands/__init__.py:
      (test_suite): Add test_commit.
    ------------------------------------------------------------
    revno: 2817.4.2
    merged: v.ladeuil+lp at free.fr-20070913161227-commdhgkj4nzzi7n
    parent: v.ladeuil+lp at free.fr-20070913100620-gih641lj9xkl5cmv
    committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
    branch nick: bzr.connection.sharing
    timestamp: Thu 2007-09-13 18:12:27 +0200
    message:
      Fix broken test.
      
      * bzrlib/tests/commands/test_update.py:
      (TestUpdate.test_update): cmd_update needs the 'dir' parameter or
      will update the current directory.
    ------------------------------------------------------------
    revno: 2817.4.1
    merged: v.ladeuil+lp at free.fr-20070913100620-gih641lj9xkl5cmv
    parent: pqm at pqm.ubuntu.com-20070912222627-zvqit350mf6gvrbh
    parent: v.ladeuil+lp at free.fr-20070911144702-wtrbcqhvlg9zwttk
    committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
    branch nick: bzr.connection.sharing
    timestamp: Thu 2007-09-13 12:06:20 +0200
    message:
      Merge cleaning, it was committed in the wrong branch
    ------------------------------------------------------------
    revno: 2814.7.1
    merged: v.ladeuil+lp at free.fr-20070911144702-wtrbcqhvlg9zwttk
    parent: pqm at pqm.ubuntu.com-20070911055622-a3060rj7l0iy38l2
    committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
    branch nick: bzr.it
    timestamp: Tue 2007-09-11 16:47:02 +0200
    message:
      Renamed install_hooks to start_logging_connections (as per Martin suggestion).
      
      * bzrlib/tests/transport_util.py:
      (TestCaseWithConnectionHookedTransport.start_logging_connections):
      Renamed from install_hooks.
      
      
      * bzrlib/tests/commands/*:
      install_hooks calls updated.
=== added file 'bzrlib/tests/commands/test_commit.py'
--- a/bzrlib/tests/commands/test_commit.py	1970-01-01 00:00:00 +0000
+++ b/bzrlib/tests/commands/test_commit.py	2007-09-18 20:04:21 +0000
@@ -0,0 +1,60 @@
+# Copyright (C) 2007 Canonical Ltd
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+import os
+from bzrlib import (
+    branch,
+    builtins,
+    errors,
+    )
+from bzrlib.tests import transport_util
+
+
+class TestCommitWithBoundBranch(
+    transport_util.TestCaseWithConnectionHookedTransport):
+
+    def setUp(self):
+        super(TestCommitWithBoundBranch, self).setUp()
+        self.master_wt = self.make_branch_and_tree('master')
+        self.local_wt = self.make_branch_and_tree('local')
+
+        master_branch = branch.Branch.open(self.get_url('master'))
+        self.local_wt.branch.bind(master_branch)
+
+    def test_commit_mine_modified(self):
+
+        self.start_logging_connections()
+
+        commit = builtins.cmd_commit()
+        # commit do not provide a directory parameter, we have to change dir
+        # manually
+        os.chdir('local')
+        commit.run(message=u'empty commit', unchanged=True)
+        self.assertEquals(1, len(self.connections))
+
+    def test_commit_both_modified(self):
+        self.master_wt.commit('empty commit on master')
+        self.start_logging_connections()
+
+        commit = builtins.cmd_commit()
+        # commit do not provide a directory parameter, we have to change dir
+        # manually
+        os.chdir('local')
+        # cmd_commit translates BoundBranchOutOfDate into BzrCommandError
+        self.assertRaises(errors.BzrCommandError, commit.run,
+                          message=u'empty commit', unchanged=True)
+        self.assertEquals(1, len(self.connections))
+

=== modified file 'NEWS'
--- a/NEWS	2007-10-04 05:30:08 +0000
+++ b/NEWS	2007-10-04 15:35:37 +0000
@@ -103,6 +103,9 @@
      some other exceptions on Python 2.5.
      (Martin Pool, #144633)
 
+   * Handles default value for ListOption in cmd_commit.
+     (Vincent Ladeuil, #140432)
+
    * HttpServer and FtpServer need to be closed properly or a listening socket
      will remain opened.
      (Vincent Ladeuil, #140055)

=== modified file 'bzrlib/branch.py'
--- a/bzrlib/branch.py	2007-09-11 01:24:09 +0000
+++ b/bzrlib/branch.py	2007-09-18 20:04:21 +0000
@@ -505,7 +505,8 @@
             raise errors.NoSuchRevision(self, revno)
         return history[revno - 1]
 
-    def pull(self, source, overwrite=False, stop_revision=None):
+    def pull(self, source, overwrite=False, stop_revision=None,
+             possible_transports=None):
         """Mirror source into this branch.
 
         This branch is considered to be 'local', having low latency.
@@ -1462,7 +1463,7 @@
 
     @needs_write_lock
     def pull(self, source, overwrite=False, stop_revision=None,
-             _hook_master=None, run_hooks=True):
+             _hook_master=None, run_hooks=True, possible_transports=None):
         """See Branch.pull.
 
         :param _hook_master: Private parameter - set the branch to 
@@ -1666,7 +1667,7 @@
         
     @needs_write_lock
     def pull(self, source, overwrite=False, stop_revision=None,
-             run_hooks=True):
+             run_hooks=True, possible_transports=None):
         """Pull from source into self, updating my master if any.
         
         :param run_hooks: Private parameter - if false, this branch
@@ -1677,7 +1678,7 @@
         master_branch = None
         if bound_location and source.base != bound_location:
             # not pulling from master, so we need to update master.
-            master_branch = self.get_master_branch()
+            master_branch = self.get_master_branch(possible_transports)
             master_branch.lock_write()
         try:
             if master_branch:

=== modified file 'bzrlib/builtins.py'
--- a/bzrlib/builtins.py	2007-10-02 08:21:43 +0000
+++ b/bzrlib/builtins.py	2007-10-04 15:35:37 +0000
@@ -598,8 +598,10 @@
             tree_to = None
             branch_to = Branch.open_containing(directory)[0]
 
+        possible_transports = []
         if location is not None:
             mergeable, location_transport = _get_mergeable_helper(location)
+            possible_transports.append(location_transport)
 
         stored_loc = branch_to.get_parent()
         if location is None:
@@ -611,7 +613,8 @@
                         self.outf.encoding)
                 self.outf.write("Using saved location: %s\n" % display_url)
                 location = stored_loc
-                location_transport = transport.get_transport(location)
+                location_transport = transport.get_transport(
+                    location, possible_transports=possible_transports)
 
         if mergeable is not None:
             if revision is not None:
@@ -637,8 +640,11 @@
         if verbose:
             old_rh = branch_to.revision_history()
         if tree_to is not None:
+            change_reporter = delta._ChangeReporter(
+                unversioned_filter=tree_to.is_ignored)
             result = tree_to.pull(branch_from, overwrite, revision_id,
-                delta._ChangeReporter(unversioned_filter=tree_to.is_ignored))
+                                  change_reporter,
+                                  possible_transports=possible_transports)
         else:
             result = branch_to.pull(branch_from, overwrite, revision_id)
 
@@ -2272,6 +2278,8 @@
             # selected-file merge commit is not done yet
             selected_list = []
 
+        if fixes is None:
+            fixes = []
         bug_property = self._get_bug_fix_properties(fixes, tree.branch)
         if bug_property:
             properties['bugs'] = bug_property

=== modified file 'bzrlib/tests/commands/__init__.py'
--- a/bzrlib/tests/commands/__init__.py	2007-09-10 09:13:50 +0000
+++ b/bzrlib/tests/commands/__init__.py	2007-10-04 15:45:21 +0000
@@ -17,10 +17,13 @@
 
 """Commands behaviour tests for bzr.
 
-This tests the behaviour of the commands.
-The API is tested in the tests/blackbox files.
+Test the internal behaviour of the commands (the blackbox tests are intended to
+test the usage of the commands).
 """
 
+# FIXME: If the separation described above from the blackbox tests is not worth
+# it, all the tests defined below should be moved to blackbox instead. 
+
 from bzrlib.tests import TestLoader
 
 
@@ -29,6 +32,7 @@
         'bzrlib.tests.commands.test_branch',
         'bzrlib.tests.commands.test_cat',
         'bzrlib.tests.commands.test_checkout',
+        'bzrlib.tests.commands.test_commit',
         'bzrlib.tests.commands.test_init',
         'bzrlib.tests.commands.test_init_repository',
         'bzrlib.tests.commands.test_merge',

=== modified file 'bzrlib/tests/commands/test_branch.py'
--- a/bzrlib/tests/commands/test_branch.py	2007-07-20 16:57:41 +0000
+++ b/bzrlib/tests/commands/test_branch.py	2007-09-11 14:47:02 +0000
@@ -24,7 +24,7 @@
     def setUp(self):
         super(TestBranch, self).setUp()
         self.make_branch_and_tree('branch')
-        self.install_hooks()
+        self.start_logging_connections()
 
     def test_branch_remote_local(self):
         cmd = cmd_branch()

=== modified file 'bzrlib/tests/commands/test_cat.py'
--- a/bzrlib/tests/commands/test_cat.py	2007-07-22 17:18:05 +0000
+++ b/bzrlib/tests/commands/test_cat.py	2007-09-11 14:47:02 +0000
@@ -47,7 +47,7 @@
         wt1.add('foo')
         wt1.commit('add foo')
 
-        self.install_hooks()
+        self.start_logging_connections()
 
         cmd = cmd_cat()
         cmd.run(self.get_url('branch/foo'))

=== modified file 'bzrlib/tests/commands/test_checkout.py'
--- a/bzrlib/tests/commands/test_checkout.py	2007-07-20 16:57:41 +0000
+++ b/bzrlib/tests/commands/test_checkout.py	2007-09-11 14:47:02 +0000
@@ -24,7 +24,7 @@
     def test_checkout(self):
         self.make_branch_and_tree('branch1')
 
-        self.install_hooks()
+        self.start_logging_connections()
 
         cmd = cmd_checkout()
         cmd.run(self.get_url('branch1'), 'local')

=== modified file 'bzrlib/tests/commands/test_init.py'
--- a/bzrlib/tests/commands/test_init.py	2007-07-20 16:57:41 +0000
+++ b/bzrlib/tests/commands/test_init.py	2007-09-11 14:47:02 +0000
@@ -23,7 +23,7 @@
 
     def setUp(self):
         super(TestInit, self).setUp()
-        self.install_hooks()
+        self.start_logging_connections()
 
     def test_init(self):
         cmd = cmd_init()

=== modified file 'bzrlib/tests/commands/test_init_repository.py'
--- a/bzrlib/tests/commands/test_init_repository.py	2007-07-20 16:57:41 +0000
+++ b/bzrlib/tests/commands/test_init_repository.py	2007-09-11 14:47:02 +0000
@@ -23,7 +23,7 @@
 
     def setUp(self):
         super(TestInitRepository, self).setUp()
-        self.install_hooks()
+        self.start_logging_connections()
 
     def test_init_repository(self):
         cmd = cmd_init_repository()

=== modified file 'bzrlib/tests/commands/test_merge.py'
--- a/bzrlib/tests/commands/test_merge.py	2007-07-20 16:57:41 +0000
+++ b/bzrlib/tests/commands/test_merge.py	2007-09-11 14:47:02 +0000
@@ -29,7 +29,7 @@
         wt2.pull(wt1.branch)
         wt2.commit('empty commit too')
 
-        self.install_hooks()
+        self.start_logging_connections()
 
         cmd = cmd_merge()
         # We don't care about the ouput but 'outf' should be defined

=== modified file 'bzrlib/tests/commands/test_missing.py'
--- a/bzrlib/tests/commands/test_missing.py	2007-08-16 17:36:50 +0000
+++ b/bzrlib/tests/commands/test_missing.py	2007-09-11 14:47:02 +0000
@@ -28,7 +28,7 @@
         wt2.pull(wt1.branch)
         wt2.commit('empty commit too')
 
-        self.install_hooks()
+        self.start_logging_connections()
 
         cmd = cmd_missing()
         # We don't care about the ouput but 'outf' should be defined

=== modified file 'bzrlib/tests/commands/test_pull.py'
--- a/bzrlib/tests/commands/test_pull.py	2007-07-20 16:57:41 +0000
+++ b/bzrlib/tests/commands/test_pull.py	2007-09-18 20:04:21 +0000
@@ -15,23 +15,44 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
 
-from bzrlib.builtins import cmd_pull
-from bzrlib.tests import StringIOWrapper
-from bzrlib.tests.transport_util import TestCaseWithConnectionHookedTransport
-
-
-class TestPull(TestCaseWithConnectionHookedTransport):
+from bzrlib import (
+    branch,
+    builtins,
+    tests,
+    )
+from bzrlib.tests import transport_util
+
+
+class TestPull(transport_util.TestCaseWithConnectionHookedTransport):
 
     def test_pull(self):
         wt1 = self.make_branch_and_tree('branch1')
         tip = wt1.commit('empty commit')
         wt2 = self.make_branch_and_tree('branch2')
 
-        self.install_hooks()
+        self.start_logging_connections()
 
-        cmd = cmd_pull()
+        cmd = builtins.cmd_pull()
         # We don't care about the ouput but 'outf' should be defined
-        cmd.outf = StringIOWrapper()
+        cmd.outf = tests.StringIOWrapper()
         cmd.run(self.get_url('branch1'), directory='branch2')
         self.assertEquals(1, len(self.connections))
 
+    def test_pull_with_bound_branch(self):
+
+        master_wt = self.make_branch_and_tree('master')
+        local_wt = self.make_branch_and_tree('local')
+        master_branch = branch.Branch.open(self.get_url('master'))
+        local_wt.branch.bind(master_branch)
+
+        remote_wt = self.make_branch_and_tree('remote')
+        remote_wt.commit('empty commit')
+
+        self.start_logging_connections()
+
+        pull = builtins.cmd_pull()
+        # We don't care about the ouput but 'outf' should be defined
+        pull.outf = tests.StringIOWrapper()
+        pull.run(self.get_url('remote'), directory='local')
+        self.assertEquals(1, len(self.connections))
+

=== modified file 'bzrlib/tests/commands/test_push.py'
--- a/bzrlib/tests/commands/test_push.py	2007-07-20 16:57:41 +0000
+++ b/bzrlib/tests/commands/test_push.py	2007-09-11 14:47:02 +0000
@@ -24,7 +24,7 @@
     def test_push(self):
         self.make_branch_and_tree('branch')
 
-        self.install_hooks()
+        self.start_logging_connections()
 
         cmd = cmd_push()
         cmd.run(self.get_url('remote'), directory='branch')

=== modified file 'bzrlib/tests/commands/test_update.py'
--- a/bzrlib/tests/commands/test_update.py	2007-09-10 12:12:47 +0000
+++ b/bzrlib/tests/commands/test_update.py	2007-09-13 16:12:27 +0000
@@ -15,26 +15,28 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
 
-from bzrlib import builtins
-from bzrlib.tests.transport_util import TestCaseWithConnectionHookedTransport
-
-
-class TestUpdate(TestCaseWithConnectionHookedTransport):
+from bzrlib import (
+    branch,
+    builtins,
+    )
+from bzrlib.tests import transport_util
+
+
+class TestUpdate(transport_util.TestCaseWithConnectionHookedTransport):
 
     def test_update(self):
-        wt1 = self.make_branch_and_tree('branch1')
-        wt2 = self.make_branch_and_tree('branch2')
-        wt2.pull(wt1.branch)
-
-        wt1.commit('empty commit')
-        wt2.commit('empty commit too')
-
-        bind = builtins.cmd_bind()
-        bind.run(location=self.get_url('branch1'))
-
-        self.install_hooks()
+        remote_wt = self.make_branch_and_tree('remote')
+        local_wt = self.make_branch_and_tree('local')
+
+        remote_branch = branch.Branch.open(self.get_url('remote'))
+        local_wt.branch.bind(remote_branch)
+
+        remote_wt.commit('empty commit')
+
+        self.start_logging_connections()
 
         update = builtins.cmd_update()
-        update.run()
+        # update calls it 'dir' where other commands calls it 'directory'
+        update.run(dir='local')
         self.assertEquals(1, len(self.connections))
 

=== modified file 'bzrlib/tests/transport_util.py'
--- a/bzrlib/tests/transport_util.py	2007-09-19 06:42:50 +0000
+++ b/bzrlib/tests/transport_util.py	2007-09-24 15:01:26 +0000
@@ -114,9 +114,9 @@
         url = _change_scheme_in(url, _backing_scheme, _hooked_scheme)
         return url
 
-    def install_hooks(self):
+    def start_logging_connections(self):
         ConnectionHookedTransport.hooks.install_hook('_set_connection',
-                                                     self.set_connection_hook)
+                                                     self._collect_connection)
         # uninstall our hooks when we are finished
         self.addCleanup(self.reset_hooks)
 
@@ -126,7 +126,7 @@
     def reset_connections(self):
         self.connections = []
 
-    def set_connection_hook(self, transport, connection, credentials):
+    def _collect_connection(self, transport, connection, credentials):
         # Note: uncomment the following line and use 'bt' under pdb, that will
         # identify all the connections made including the extraneous ones.
         # import pdb; pdb.set_trace()

=== modified file 'bzrlib/workingtree.py'
--- a/bzrlib/workingtree.py	2007-09-27 21:11:38 +0000
+++ b/bzrlib/workingtree.py	2007-10-04 15:35:37 +0000
@@ -1522,7 +1522,7 @@
 
     @needs_write_lock
     def pull(self, source, overwrite=False, stop_revision=None,
-             change_reporter=None):
+             change_reporter=None, possible_transports=None):
         top_pb = bzrlib.ui.ui_factory.nested_progress_bar()
         source.lock_read()
         try:
@@ -1530,7 +1530,8 @@
             pp.next_phase()
             old_revision_info = self.branch.last_revision_info()
             basis_tree = self.basis_tree()
-            count = self.branch.pull(source, overwrite, stop_revision)
+            count = self.branch.pull(source, overwrite, stop_revision,
+                                     possible_transports=possible_transports)
             new_revision_info = self.branch.last_revision_info()
             if new_revision_info != old_revision_info:
                 pp.next_phase()




More information about the bazaar-commits mailing list