Rev 2856: Merge commit-delete performance improvements. in http://people.ubuntu.com/~robertc/baz2.0/repository

Robert Collins robertc at robertcollins.net
Wed Oct 24 23:44:14 BST 2007


At http://people.ubuntu.com/~robertc/baz2.0/repository

------------------------------------------------------------
revno: 2856
revision-id:robertc at robertcollins.net-20071024224358-yh4vgktvgc7tnr1a
parent: robertc at robertcollins.net-20071024075138-ga16uc9y30zbx7pv
parent: robertc at robertcollins.net-20071024223742-fhjlj7l6lu77s9zq
committer: Robert Collins <robertc at robertcollins.net>
branch nick: repository
timestamp: Thu 2007-10-25 08:43:58 +1000
message:
  Merge commit-delete performance improvements.
added:
  bzrlib/plugins/launchpad/account.py account.py-20071011033320-50y6vfftywf4yllw-1
  bzrlib/plugins/launchpad/test_account.py test_account.py-20071011033320-50y6vfftywf4yllw-2
modified:
  Makefile                       Makefile-20050805140406-d96e3498bb61c5bb
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/commit.py               commit.py-20050511101309-79ec1a0168e0e825
  bzrlib/inventory.py            inventory.py-20050309040759-6648b84ca2005b37
  bzrlib/plugins/launchpad/__init__.py __init__.py-20060315182712-2d5feebd2a1032dc
  bzrlib/plugins/launchpad/test_register.py test_register.py-20060315182712-40f5dda945c829a8
  bzrlib/tests/inventory_implementations/basics.py basics.py-20070903044446-kdjwbiu1p1zi9phs-1
  bzrlib/transport/__init__.py   transport.py-20050711165921-4978aa7ce1285ad5
  bzrlib/transport/http/_pycurl.py pycurlhttp.py-20060110060940-4e2a705911af77a6
  bzrlib/transport/http/_urllib.py _urlgrabber.py-20060113083826-0bbf7d992fbf090c
  bzrlib/transport/remote.py     ssh.py-20060608202016-c25gvf1ob7ypbus6-1
  bzrlib/transport/sftp.py       sftp.py-20051019050329-ab48ce71b7e32dfe
    ------------------------------------------------------------
    revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.2.1.12.1.8.1.46.1.18.1.1.2.21.2.10.3.8.2.10
    revision-id:robertc at robertcollins.net-20071024223742-fhjlj7l6lu77s9zq
    parent: pqm at pqm.ubuntu.com-20071024181951-qqo4r5mqrhr032pf
    committer: Robert Collins <robertc at robertcollins.net>
    branch nick: commit
    timestamp: Thu 2007-10-25 08:37:42 +1000
    message:
      * Commit with many automatically found deleted paths no longer performs
        linear scanning for the children of those paths during inventory
        iteration. This should fix commit performance blowing out when many such
        paths occur during commit. (Robert Collins, #156491)
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzrlib/commit.py               commit.py-20050511101309-79ec1a0168e0e825
    ------------------------------------------------------------
    revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.2.1.12.1.8.1.46.1.18.1.1.2.21.2.10.3.8.2.9
    revision-id:pqm at pqm.ubuntu.com-20071024181951-qqo4r5mqrhr032pf
    parent: pqm at pqm.ubuntu.com-20071024171920-7ow21d7v5crrxdc4
    parent: john at arbash-meinel.com-20071024172606-qxfil64hcjy7n7s5
    committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
    branch nick: +trunk
    timestamp: Wed 2007-10-24 19:19:51 +0100
    message:
      (John Arbash Meinel) Register netloc protocols earlier. Helps reduce some race conditions.
    modified:
      bzrlib/transport/__init__.py   transport.py-20050711165921-4978aa7ce1285ad5
      bzrlib/transport/http/_pycurl.py pycurlhttp.py-20060110060940-4e2a705911af77a6
      bzrlib/transport/http/_urllib.py _urlgrabber.py-20060113083826-0bbf7d992fbf090c
      bzrlib/transport/remote.py     ssh.py-20060608202016-c25gvf1ob7ypbus6-1
      bzrlib/transport/sftp.py       sftp.py-20051019050329-ab48ce71b7e32dfe
        ------------------------------------------------------------
        revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.2.1.12.1.8.1.46.1.18.1.1.2.21.2.8.2.2
        revision-id:john at arbash-meinel.com-20071024172606-qxfil64hcjy7n7s5
        parent: john at arbash-meinel.com-20071019195606-ksvbz5hfy7p5xwvh
        committer: John Arbash Meinel <john at arbash-meinel.com>
        branch nick: netloc_protocols
        timestamp: Wed 2007-10-24 12:26:06 -0500
        message:
          fix a simple typo
        modified:
          bzrlib/transport/__init__.py   transport.py-20050711165921-4978aa7ce1285ad5
        ------------------------------------------------------------
        revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.2.1.12.1.8.1.46.1.18.1.1.2.21.2.8.2.1
        revision-id:john at arbash-meinel.com-20071019195606-ksvbz5hfy7p5xwvh
        parent: pqm at pqm.ubuntu.com-20071019183933-ponmwcztrwpn9o7w
        committer: John Arbash Meinel <john at arbash-meinel.com>
        branch nick: netloc_protocols
        timestamp: Fri 2007-10-19 14:56:06 -0500
        message:
          Register netloc protocols as soon as the protocol is registered.
          Rather than waiting for importing the submodule to register it.
          This fixes a timing bug when opening a master branch that points to a new
          url prefix. The code to re-use the existing transport would try to
          parse the URL before the netloc prefix had been registered.
        modified:
          bzrlib/transport/__init__.py   transport.py-20050711165921-4978aa7ce1285ad5
          bzrlib/transport/http/_pycurl.py pycurlhttp.py-20060110060940-4e2a705911af77a6
          bzrlib/transport/http/_urllib.py _urlgrabber.py-20060113083826-0bbf7d992fbf090c
          bzrlib/transport/remote.py     ssh.py-20060608202016-c25gvf1ob7ypbus6-1
          bzrlib/transport/sftp.py       sftp.py-20051019050329-ab48ce71b7e32dfe
    ------------------------------------------------------------
    revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.2.1.12.1.8.1.46.1.18.1.1.2.21.2.10.3.8.2.8
    revision-id:pqm at pqm.ubuntu.com-20071024171920-7ow21d7v5crrxdc4
    parent: pqm at pqm.ubuntu.com-20071024124917-xb75eckyxx6vkrlg
    parent: jelmer at samba.org-20071024152918-n107qoussymup0q6
    committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
    branch nick: +trunk
    timestamp: Wed 2007-10-24 18:19:20 +0100
    message:
      Fix Inventory.copy() and add a test for it.
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzrlib/inventory.py            inventory.py-20050309040759-6648b84ca2005b37
      bzrlib/tests/inventory_implementations/basics.py basics.py-20070903044446-kdjwbiu1p1zi9phs-1
        ------------------------------------------------------------
        revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.2.1.12.1.8.1.46.1.18.1.1.2.21.2.10.3.8.2.6.2.1
        revision-id:jelmer at samba.org-20071024152918-n107qoussymup0q6
        parent: pqm at pqm.ubuntu.com-20071024090631-gwml8hkp57feuoy3
        committer: Jelmer Vernooij <jelmer at samba.org>
        branch nick: bzr.dev
        timestamp: Wed 2007-10-24 17:29:18 +0200
        message:
          Fix Inventory.copy() and add a test for it.
        modified:
          NEWS                           NEWS-20050323055033-4e00b5db738777ff
          bzrlib/inventory.py            inventory.py-20050309040759-6648b84ca2005b37
          bzrlib/tests/inventory_implementations/basics.py basics.py-20070903044446-kdjwbiu1p1zi9phs-1
    ------------------------------------------------------------
    revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.2.1.12.1.8.1.46.1.18.1.1.2.21.2.10.3.8.2.7
    revision-id:pqm at pqm.ubuntu.com-20071024124917-xb75eckyxx6vkrlg
    parent: pqm at pqm.ubuntu.com-20071024090631-gwml8hkp57feuoy3
    parent: ian.clatworthy at internode.on.net-20071024120629-ug18cmlmjnynlbn1
    committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
    branch nick: +trunk
    timestamp: Wed 2007-10-24 13:49:17 +0100
    message:
      Makefile fixes - hooks.html generation & allow python to be overridden (Ian Clatworthy)
    modified:
      Makefile                       Makefile-20050805140406-d96e3498bb61c5bb
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
        ------------------------------------------------------------
        revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.2.1.12.1.8.1.46.1.18.1.1.2.21.2.10.3.8.2.6.1.1
        revision-id:ian.clatworthy at internode.on.net-20071024120629-ug18cmlmjnynlbn1
        parent: pqm at pqm.ubuntu.com-20071024090631-gwml8hkp57feuoy3
        parent: ian.clatworthy at internode.on.net-20071024080025-0nrboebjvpy0jqsu
        committer: Ian Clatworthy <ian.clatworthy at internode.on.net>
        branch nick: ianc-integration
        timestamp: Wed 2007-10-24 22:06:29 +1000
        message:
          Makefile fixes - hooks.html generation & allow python to be overridden (Ian Clatworthy)
        modified:
          Makefile                       Makefile-20050805140406-d96e3498bb61c5bb
          NEWS                           NEWS-20050323055033-4e00b5db738777ff
        ------------------------------------------------------------
        revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.2.1.12.1.8.1.46.1.18.1.1.2.21.2.10.3.8.2.5.2.1
        revision-id:ian.clatworthy at internode.on.net-20071024080025-0nrboebjvpy0jqsu
        parent: pqm at pqm.ubuntu.com-20071024072800-p2qtv2632xrbrs02
        committer: Ian Clatworthy <ian.clatworthy at internode.on.net>
        branch nick: bzr.Makefile-fixes
        timestamp: Wed 2007-10-24 18:00:25 +1000
        message:
          generates hooks.html correctly and generalise python command in Makefile
        modified:
          Makefile                       Makefile-20050805140406-d96e3498bb61c5bb
          NEWS                           NEWS-20050323055033-4e00b5db738777ff
    ------------------------------------------------------------
    revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.2.1.12.1.8.1.46.1.18.1.1.2.21.2.10.3.8.2.6
    revision-id:pqm at pqm.ubuntu.com-20071024090631-gwml8hkp57feuoy3
    parent: pqm at pqm.ubuntu.com-20071024072800-p2qtv2632xrbrs02
    parent: ian.clatworthy at internode.on.net-20071024081218-8hmyh67lkiz22exo
    committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
    branch nick: +trunk
    timestamp: Wed 2007-10-24 10:06:31 +0100
    message:
      (James Henstridge) add a command for managing the Launchpad user ID
    added:
      bzrlib/plugins/launchpad/account.py account.py-20071011033320-50y6vfftywf4yllw-1
      bzrlib/plugins/launchpad/test_account.py test_account.py-20071011033320-50y6vfftywf4yllw-2
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzrlib/plugins/launchpad/__init__.py __init__.py-20060315182712-2d5feebd2a1032dc
      bzrlib/plugins/launchpad/test_register.py test_register.py-20060315182712-40f5dda945c829a8
    ------------------------------------------------------------
    revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.2.1.12.1.8.1.46.1.18.1.1.2.21.2.10.3.8.2.5.1.1
    revision-id:ian.clatworthy at internode.on.net-20071024081218-8hmyh67lkiz22exo
    parent: pqm at pqm.ubuntu.com-20071024072800-p2qtv2632xrbrs02
    parent: james at jamesh.id.au-20071018085819-zv64jvki41van9fq
    committer: Ian Clatworthy <ian.clatworthy at internode.on.net>
    branch nick: ianc-integration
    timestamp: Wed 2007-10-24 18:12:18 +1000
    message:
      (James Henstridge) add a command for managing the Launchpad user ID
    added:
      bzrlib/plugins/launchpad/account.py account.py-20071011033320-50y6vfftywf4yllw-1
      bzrlib/plugins/launchpad/test_account.py test_account.py-20071011033320-50y6vfftywf4yllw-2
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzrlib/plugins/launchpad/__init__.py __init__.py-20060315182712-2d5feebd2a1032dc
      bzrlib/plugins/launchpad/test_register.py test_register.py-20060315182712-40f5dda945c829a8
    ------------------------------------------------------------
    revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.2.1.12.1.8.1.46.1.18.1.1.2.8.3.10
    revision-id:james at jamesh.id.au-20071018085819-zv64jvki41van9fq
    parent: james at jamesh.id.au-20071012044216-1aystcylm32fjb67
    committer: James Henstridge <james at jamesh.id.au>
    branch nick: bzr.lp-whoami
    timestamp: Thu 2007-10-18 21:58:19 +1300
    message:
      Make LaunchpadAccountTests a TestCaseInTempDir so that config changes 
      don't leak through to subsequent tests.
    modified:
      bzrlib/plugins/launchpad/test_account.py test_account.py-20071011033320-50y6vfftywf4yllw-2
    ------------------------------------------------------------
    revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.2.1.12.1.8.1.46.1.18.1.1.2.8.3.9
    revision-id:james at jamesh.id.au-20071012044216-1aystcylm32fjb67
    parent: james at jamesh.id.au-20071012031830-wjdzorg06j4nidpr
    committer: James Henstridge <james at jamesh.id.au>
    branch nick: bzr.lp-whoami
    timestamp: Fri 2007-10-12 17:42:16 +1300
    message:
      * Add a simple NEWS item for the command.
      * May launchpad-login return an error if no user is configured.
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzrlib/plugins/launchpad/__init__.py __init__.py-20060315182712-2d5feebd2a1032dc
      bzrlib/plugins/launchpad/test_account.py test_account.py-20071011033320-50y6vfftywf4yllw-2
    ------------------------------------------------------------
    revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.2.1.12.1.8.1.46.1.18.1.1.2.8.3.8
    revision-id:james at jamesh.id.au-20071012031830-wjdzorg06j4nidpr
    parent: james at jamesh.id.au-20071012025418-14tofx4n8d69uxsh
    committer: James Henstridge <james at jamesh.id.au>
    branch nick: bzr.lp-whoami
    timestamp: Fri 2007-10-12 16:18:30 +1300
    message:
      Get rid of relative imports in Launchpad plugin.
    modified:
      bzrlib/plugins/launchpad/__init__.py __init__.py-20060315182712-2d5feebd2a1032dc
      bzrlib/plugins/launchpad/test_register.py test_register.py-20060315182712-40f5dda945c829a8
    ------------------------------------------------------------
    revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.2.1.12.1.8.1.46.1.18.1.1.2.8.3.7
    revision-id:james at jamesh.id.au-20071012025418-14tofx4n8d69uxsh
    parent: james at jamesh.id.au-20071012015858-5ryp4uy3sxviwztl
    committer: James Henstridge <james at jamesh.id.au>
    branch nick: bzr.lp-whoami
    timestamp: Fri 2007-10-12 15:54:18 +1300
    message:
      * Add tests for account.py exception messages.
      * Fix docstring on set_lp_login()
      * use False as default value for no_check option to plugin.
    modified:
      bzrlib/plugins/launchpad/__init__.py __init__.py-20060315182712-2d5feebd2a1032dc
      bzrlib/plugins/launchpad/account.py account.py-20071011033320-50y6vfftywf4yllw-1
      bzrlib/plugins/launchpad/test_account.py test_account.py-20071011033320-50y6vfftywf4yllw-2
    ------------------------------------------------------------
    revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.2.1.12.1.8.1.46.1.18.1.1.2.8.3.6
    revision-id:james at jamesh.id.au-20071012015858-5ryp4uy3sxviwztl
    parent: james at jamesh.id.au-20071011231604-lturuvqizllfab3f
    committer: James Henstridge <james at jamesh.id.au>
    branch nick: bzr.lp-whoami
    timestamp: Fri 2007-10-12 14:58:58 +1300
    message:
      Rename function arguments that are only intended for use by the tests.
    modified:
      bzrlib/plugins/launchpad/account.py account.py-20071011033320-50y6vfftywf4yllw-1
    ------------------------------------------------------------
    revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.2.1.12.1.8.1.46.1.18.1.1.2.8.3.5
    revision-id:james at jamesh.id.au-20071011231604-lturuvqizllfab3f
    parent: james at jamesh.id.au-20071011205810-gduc1htgwr7dzasi
    committer: James Henstridge <james at jamesh.id.au>
    branch nick: bzr.lp-whoami
    timestamp: Fri 2007-10-12 12:16:04 +1300
    message:
      Add copyright headers to new files
    modified:
      bzrlib/plugins/launchpad/account.py account.py-20071011033320-50y6vfftywf4yllw-1
      bzrlib/plugins/launchpad/test_account.py test_account.py-20071011033320-50y6vfftywf4yllw-2
    ------------------------------------------------------------
    revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.2.1.12.1.8.1.46.1.18.1.1.2.8.3.4
    revision-id:james at jamesh.id.au-20071011205810-gduc1htgwr7dzasi
    parent: james at jamesh.id.au-20071011043626-qb6kk43qy12201x9
    committer: James Henstridge <james at jamesh.id.au>
    branch nick: bzr.lp-whoami
    timestamp: Fri 2007-10-12 09:58:10 +1300
    message:
      Cleanups from mini-review by Tim.
    modified:
      bzrlib/plugins/launchpad/__init__.py __init__.py-20060315182712-2d5feebd2a1032dc
      bzrlib/plugins/launchpad/test_account.py test_account.py-20071011033320-50y6vfftywf4yllw-2
    ------------------------------------------------------------
    revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.2.1.12.1.8.1.46.1.18.1.1.2.8.3.3
    revision-id:james at jamesh.id.au-20071011043626-qb6kk43qy12201x9
    parent: james at jamesh.id.au-20071011043518-hh6wp24w2oc3c73v
    committer: James Henstridge <james at jamesh.id.au>
    branch nick: bzr.lp-whoami
    timestamp: Thu 2007-10-11 17:36:26 +1300
    message:
      Add launchpad-login command.
    modified:
      bzrlib/plugins/launchpad/__init__.py __init__.py-20060315182712-2d5feebd2a1032dc
    ------------------------------------------------------------
    revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.2.1.12.1.8.1.46.1.18.1.1.2.8.3.2
    revision-id:james at jamesh.id.au-20071011043518-hh6wp24w2oc3c73v
    parent: james at jamesh.id.au-20071011033403-m8gfas0yzbe5a7a0
    committer: James Henstridge <james at jamesh.id.au>
    branch nick: bzr.lp-whoami
    timestamp: Thu 2007-10-11 17:35:18 +1300
    message:
      Rename functions.
    modified:
      bzrlib/plugins/launchpad/account.py account.py-20071011033320-50y6vfftywf4yllw-1
      bzrlib/plugins/launchpad/test_account.py test_account.py-20071011033320-50y6vfftywf4yllw-2
    ------------------------------------------------------------
    revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.2.1.12.1.8.1.46.1.18.1.1.2.8.3.1
    revision-id:james at jamesh.id.au-20071011033403-m8gfas0yzbe5a7a0
    parent: pqm at pqm.ubuntu.com-20071009044446-uliu5z9a52bzmps8
    committer: James Henstridge <james at jamesh.id.au>
    branch nick: bzr.lp-whoami
    timestamp: Thu 2007-10-11 16:34:03 +1300
    message:
      API for storing and retrieving the Launchpad user ID that will be used 
      by other Bazaar functions.
    added:
      bzrlib/plugins/launchpad/account.py account.py-20071011033320-50y6vfftywf4yllw-1
      bzrlib/plugins/launchpad/test_account.py test_account.py-20071011033320-50y6vfftywf4yllw-2
=== added file 'bzrlib/plugins/launchpad/account.py'
--- a/bzrlib/plugins/launchpad/account.py	1970-01-01 00:00:00 +0000
+++ b/bzrlib/plugins/launchpad/account.py	2007-10-24 08:12:18 +0000
@@ -0,0 +1,70 @@
+# 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
+
+"""Functions to manage the user's Launchpad user ID.
+
+This allows the user to configure their Launchpad user ID once, rather
+than once for each place that needs to take it into account.
+"""
+
+from bzrlib import errors
+from bzrlib.config import GlobalConfig
+from bzrlib.transport import get_transport
+
+
+LAUNCHPAD_BASE = 'https://launchpad.net/'
+
+
+class UnknownLaunchpadUsername(errors.BzrError):
+    _fmt = "The user name %(user)s is not registered on Launchpad."
+
+
+class NoRegisteredSSHKeys(errors.BzrError):
+    _fmt = "The user %(user)s has not registered any SSH keys with Launchpad."
+
+
+def get_lp_login(_config=None):
+    """Return the user's Launchpad username"""
+    if _config is None:
+        _config = GlobalConfig()
+
+    return _config.get_user_option('launchpad_username')
+
+
+def set_lp_login(username, _config=None):
+    """Set the user's Launchpad username"""
+    if _config is None:
+        _config = GlobalConfig()
+
+    _config.set_user_option('launchpad_username', username)
+
+
+def check_lp_login(username, _transport=None):
+    """Check whether the given Launchpad username is okay.
+
+    This will check for both existence and whether the user has
+    uploaded SSH keys.
+    """
+    if _transport is None:
+        _transport = get_transport(LAUNCHPAD_BASE)
+
+    try:
+        data = _transport.get_bytes('~%s/+sshkeys' % username)
+    except errors.NoSuchFile:
+        raise UnknownLaunchpadUsername(user=username)
+
+    if not data:
+        raise NoRegisteredSSHKeys(user=username)

=== added file 'bzrlib/plugins/launchpad/test_account.py'
--- a/bzrlib/plugins/launchpad/test_account.py	1970-01-01 00:00:00 +0000
+++ b/bzrlib/plugins/launchpad/test_account.py	2007-10-18 08:58:19 +0000
@@ -0,0 +1,85 @@
+# 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
+
+"""Tests for Launchpad user ID management functions."""
+
+from cStringIO import StringIO
+
+from bzrlib import config
+from bzrlib.tests import TestCaseInTempDir, TestCaseWithMemoryTransport
+from bzrlib.plugins.launchpad import account
+
+
+class LaunchpadAccountTests(TestCaseInTempDir):
+
+    def setup_config(self, text):
+        my_config = config.GlobalConfig()
+        config_file = StringIO(text)
+        my_config._get_parser(config_file)
+        return my_config
+
+    def test_get_lp_login_unconfigured(self):
+        # Test that get_lp_login() returns None if no username has
+        # been configured.
+        my_config = self.setup_config('')
+        self.assertEqual(None, account.get_lp_login(my_config))
+
+    def test_get_lp_login(self):
+        # Test that get_lp_login() returns the configured username
+        my_config = self.setup_config(
+            '[DEFAULT]\nlaunchpad_username=test-user\n')
+        self.assertEqual('test-user', account.get_lp_login(my_config))
+
+    def test_set_lp_login(self):
+        # Test that set_lp_login() updates the config file.
+        my_config = self.setup_config('')
+        self.assertEqual(None, my_config.get_user_option('launchpad_username'))
+        account.set_lp_login('test-user', my_config)
+        self.assertEqual(
+            'test-user', my_config.get_user_option('launchpad_username'))
+
+    def test_unknown_launchpad_username(self):
+        # Test formatting of UnknownLaunchpadUsername exception
+        error = account.UnknownLaunchpadUsername(user='test-user')
+        self.assertEqualDiff('The user name test-user is not registered '
+                             'on Launchpad.', str(error))
+
+    def test_no_registered_ssh_keys(self):
+        # Test formatting of NoRegisteredSSHKeys exception
+        error = account.NoRegisteredSSHKeys(user='test-user')
+        self.assertEqualDiff('The user test-user has not registered any '
+                             'SSH keys with Launchpad.', str(error))
+
+
+class CheckAccountTests(TestCaseWithMemoryTransport):
+
+    def test_check_lp_login_valid_user(self):
+        transport = self.get_transport()
+        transport.mkdir('~test-user')
+        transport.put_bytes('~test-user/+sshkeys', 'some keys here')
+        account.check_lp_login('test-user', transport)
+
+    def test_check_lp_login_no_user(self):
+        transport = self.get_transport()
+        self.assertRaises(account.UnknownLaunchpadUsername,
+                          account.check_lp_login, 'test-user', transport)
+
+    def test_check_lp_login_no_ssh_keys(self):
+        transport = self.get_transport()
+        transport.mkdir('~test-user')
+        transport.put_bytes('~test-user/+sshkeys', '')
+        self.assertRaises(account.NoRegisteredSSHKeys,
+                          account.check_lp_login, 'test-user', transport)

=== modified file 'Makefile'
--- a/Makefile	2007-10-20 03:27:12 +0000
+++ b/Makefile	2007-10-24 08:00:25 +0000
@@ -31,7 +31,7 @@
 	$(PYTHON) setup.py build_ext -i
 
 check: docs extensions
-	python -Werror -O ./bzr selftest -1v $(tests)
+	$(PYTHON) -Werror -O ./bzr selftest -1v $(tests)
 	@echo "Running all tests with no locale."
 	LC_CTYPE= LANG=C LC_ALL= ./bzr selftest -1v $(tests) 2>&1 | sed -e 's/^/[ascii] /'
 
@@ -48,16 +48,16 @@
 	pyflakes bzrlib | grep -v ' imported but unused'
 
 clean:
-	python setup.py clean
+	$(PYTHON) setup.py clean
 	-find . -name "*.pyc" -o -name "*.pyo" -o -name "*.so" | xargs rm -f
 
 # Build API documentation
 docfiles = bzr bzrlib
 api-docs:
 	mkdir -p api/html
-	PYTHONPATH=$(PWD) python tools/bzr_epydoc --html -o api/html --docformat 'restructuredtext en' $(docfiles)
+	PYTHONPATH=$(PWD) $(PYTHON) tools/bzr_epydoc --html -o api/html --docformat 'restructuredtext en' $(docfiles)
 check-api-docs:
-	PYTHONPATH=$(PWD) python tools/bzr_epydoc --check --docformat 'restructuredtext en' $(docfiles)
+	PYTHONPATH=$(PWD) $(PYTHON) tools/bzr_epydoc --check --docformat 'restructuredtext en' $(docfiles)
 
 # build tags for emacs and vim
 TAGS:
@@ -73,9 +73,9 @@
 
 # set PRETTY to get docs that look like the Bazaar web site
 ifdef PRETTY
-rst2html := python tools/rst2prettyhtml.py doc/bazaar-vcs.org.kid 
+rst2html := $(PYTHON) tools/rst2prettyhtml.py doc/bazaar-vcs.org.kid 
 else
-rst2html := python tools/rst2html.py --link-stylesheet --footnote-references=superscript 
+rst2html := $(PYTHON) tools/rst2html.py --link-stylesheet --footnote-references=superscript 
 endif
 
 # translate txt docs to html
@@ -86,6 +86,7 @@
 doc_dir := doc/en/user-guide
 txt_files := $(wildcard $(addsuffix /*.txt, $(doc_dir))) $(derived_txt_files) \
 	doc/en/mini-tutorial/index.txt \
+	doc/en/user-reference/hooks.txt \
 	doc/index.txt
 non_txt_files := \
        doc/default.css \
@@ -113,17 +114,17 @@
 		 tools/doc_generate/autodoc_rstx.py
 
 doc/en/user-reference/bzr_man.txt: $(MAN_DEPENDENCIES)
-	python generate_docs.py -o $@ rstx
+	$(PYTHON) generate_docs.py -o $@ rstx
 
 doc/en/developer-guide/HACKING.txt: doc/developers/HACKING.txt
-	python tools/win32/ostools.py copytodir doc/developers/HACKING.txt doc/en/developer-guide
+	$(PYTHON) tools/win32/ostools.py copytodir doc/developers/HACKING.txt doc/en/developer-guide
 
 doc/en/release-notes/NEWS.txt: NEWS
-	python -c "import shutil; shutil.copyfile('$<', '$@')"
+	$(PYTHON) -c "import shutil; shutil.copyfile('$<', '$@')"
 
 MAN_PAGES = man1/bzr.1
 man1/bzr.1: $(MAN_DEPENDENCIES)
-	python generate_docs.py -o $@ man
+	$(PYTHON) generate_docs.py -o $@ man
 
 # build a png of our performance task list
 doc/developers/performance.png: doc/developers/performance.dot
@@ -140,11 +141,11 @@
 # produce a tree containing just the final docs, ready for uploading to the web
 HTMLDIR := html_docs
 html-docs: docs
-	python tools/win32/ostools.py copytree $(WEB_DOCS) $(HTMLDIR)
+	$(PYTHON) tools/win32/ostools.py copytree $(WEB_DOCS) $(HTMLDIR)
 
 # clean produced docs
 clean-docs:
-	python tools/win32/ostools.py remove $(ALL_DOCS) \
+	$(PYTHON) tools/win32/ostools.py remove $(ALL_DOCS) \
 	$(HTMLDIR) $(derived_txt_files)
 
 
@@ -153,10 +154,10 @@
 # make bzr.exe for win32 with py2exe
 exe:
 	@echo *** Make bzr.exe
-	python setup.py build_ext -i -f
-	python setup.py py2exe > py2exe.log
-	python tools/win32/ostools.py copytodir tools/win32/start_bzr.bat win32_bzr.exe
-	python tools/win32/ostools.py copytodir tools/win32/bazaar.url win32_bzr.exe
+	$(PYTHON) setup.py build_ext -i -f
+	$(PYTHON) setup.py py2exe > py2exe.log
+	$(PYTHON) tools/win32/ostools.py copytodir tools/win32/start_bzr.bat win32_bzr.exe
+	$(PYTHON) tools/win32/ostools.py copytodir tools/win32/bazaar.url win32_bzr.exe
 
 # win32 installer for bzr.exe
 installer: exe copy-docs
@@ -164,22 +165,22 @@
 	cog.py -d -o tools/win32/bzr.iss tools/win32/bzr.iss.cog
 	iscc /Q tools/win32/bzr.iss
 
-# win32 python's distutils-based installer
-# require to have python interpreter installed on win32
+# win32 Python's distutils-based installer
+# require to have Python interpreter installed on win32
 python-installer: docs
 	python24 setup.py bdist_wininst --install-script="bzr-win32-bdist-postinstall.py" -d .
 	python25 setup.py bdist_wininst --install-script="bzr-win32-bdist-postinstall.py" -d .
 
 copy-docs: docs
-	python tools/win32/ostools.py copytodir README win32_bzr.exe/doc
-	python tools/win32/ostools.py copytree $(WEB_DOCS) win32_bzr.exe
+	$(PYTHON) tools/win32/ostools.py copytodir README win32_bzr.exe/doc
+	$(PYTHON) tools/win32/ostools.py copytree $(WEB_DOCS) win32_bzr.exe
 
 # clean on win32 all installer-related files and directories
 clean-win32: clean-docs
-	python tools/win32/ostools.py remove build
-	python tools/win32/ostools.py remove win32_bzr.exe
-	python tools/win32/ostools.py remove py2exe.log
-	python tools/win32/ostools.py remove tools/win32/bzr.iss
-	python tools/win32/ostools.py remove bzr-setup*.exe
-	python tools/win32/ostools.py remove bzr-*win32.exe
-	python tools/win32/ostools.py remove dist
+	$(PYTHON) tools/win32/ostools.py remove build
+	$(PYTHON) tools/win32/ostools.py remove win32_bzr.exe
+	$(PYTHON) tools/win32/ostools.py remove py2exe.log
+	$(PYTHON) tools/win32/ostools.py remove tools/win32/bzr.iss
+	$(PYTHON) tools/win32/ostools.py remove bzr-setup*.exe
+	$(PYTHON) tools/win32/ostools.py remove bzr-*win32.exe
+	$(PYTHON) tools/win32/ostools.py remove dist

=== modified file 'NEWS'
--- a/NEWS	2007-10-24 07:51:38 +0000
+++ b/NEWS	2007-10-24 22:43:58 +0000
@@ -39,6 +39,10 @@
      remote bzr locations than BZR_REMOTE_PATH environment variable.
      (Aaron Bentley)
 
+   * New ``launchpad-login`` command to tell Bazaar your Launchpad
+     user ID.  This can then be used by other functions of the
+     Launchpad plugin. (James Henstridge)
+
   PERFORMANCE:
 
    * Commit in quiet mode is now slightly faster as the information to
@@ -47,6 +51,11 @@
    * Commit no longer checks for new text keys during insertion when the
      revision id was deterministically unique. (Robert Collins)
 
+   * Commit with many automatically found deleted paths no longer performs
+     linear scanning for the children of those paths during inventory
+     iteration. This should fix commit performance blowing out when many such
+     paths occur during commit. (Robert Collins, #156491)
+
    * Committing a change which is not a merge and does not change the number of
      files in the tree is faster by utilising the data about whether files are
      changed to determine if the tree is unchanged rather than recalculating
@@ -95,6 +104,9 @@
 
    * New *Bazaar in Five Minutes* guide.  (Matthew Revell)
 
+   * The hooks reference documentation is now converted to html as expected.
+     (Ian Clatworthy)
+
   BUG FIXES:
 
    * Make sure to use ``O_BINARY`` when opening files to check their
@@ -145,6 +157,8 @@
      some other exceptions on Python 2.5.
      (Martin Pool, #144633)
 
+   * Fix ``Inventory.copy()`` and add test for it. (Jelmer Vernooij)
+
    * Handles default value for ListOption in cmd_commit.
      (Vincent Ladeuil, #140432)
 
@@ -277,6 +291,9 @@
      boolean indicating whether a new file graph node was recorded.
      (Robert Collins)
 
+   * The python path used in the Makefile can now be overridden.
+     (Andrew Bennetts, Ian Clatworthy)
+
   TESTING:
 
    * New transport implementation ``trace+`` which is useful for testing,

=== modified file 'bzrlib/commit.py'
--- a/bzrlib/commit.py	2007-10-24 07:51:38 +0000
+++ b/bzrlib/commit.py	2007-10-24 22:43:58 +0000
@@ -71,7 +71,9 @@
 from bzrlib.osutils import (kind_marker, isdir,isfile, is_inside_any,
                             is_inside_or_parent_of_any,
                             minimum_path_selection,
-                            quotefn, sha_file, split_lines)
+                            quotefn, sha_file, split_lines,
+                            splitpath,
+                            )
 from bzrlib.testament import Testament
 from bzrlib.trace import mutter, note, warning, is_quiet
 from bzrlib.xml5 import serializer_v5
@@ -694,7 +696,7 @@
                
         report_changes = self.reporter.is_verbose()
         deleted_ids = []
-        deleted_paths = set()
+        deleted_paths = {}
         # XXX: Note that entries may have the wrong kind because the entry does
         # not reflect the status on disk.
         work_inv = self.work_tree.inventory
@@ -708,16 +710,36 @@
             if kind == 'directory':
                 self._next_progress_entry()
             # Skip files that have been deleted from the working tree.
-            # The deleted files/directories are also recorded so they
-            # can be explicitly unversioned later. Note that when a
-            # filter of specific files is given, we must only skip/record
-            # deleted files matching that filter.
-            if is_inside_any(deleted_paths, path):
-                continue
+            # The deleted path ids are also recorded so they can be explicitly
+            # unversioned later.
+            if deleted_paths:
+                path_segments = splitpath(path)
+                deleted_dict = deleted_paths
+                for segment in path_segments:
+                    deleted_dict = deleted_dict.get(segment, None)
+                    if deleted_dict is None:
+                        # We took a path not present in the dict.
+                        break
+                    if not deleted_dict:
+                        # We've reached an empty child dir in the dict, so are now
+                        # a sub-path.
+                        break
+                else:
+                    deleted_dict = None
+                if deleted_dict is not None:
+                    # the path has a deleted parent, do not add it.
+                    continue
             content_summary = self.work_tree.path_content_summary(path)
+            # Note that when a filter of specific files is given, we must only
+            # skip/record deleted files matching that filter.
             if not specific_files or is_inside_any(specific_files, path):
                 if content_summary[0] == 'missing':
-                    deleted_paths.add(path)
+                    if not deleted_paths:
+                        # path won't have been split yet.
+                        path_segments = splitpath(path)
+                    deleted_dict = deleted_paths
+                    for segment in path_segments:
+                        deleted_dict = deleted_dict.setdefault(segment, {})
                     self.reporter.missing(path)
                     deleted_ids.append(file_id)
                     continue

=== modified file 'bzrlib/inventory.py'
--- a/bzrlib/inventory.py	2007-10-16 17:37:43 +0000
+++ b/bzrlib/inventory.py	2007-10-24 15:29:18 +0000
@@ -951,7 +951,7 @@
         other = Inventory(entries.next()[1].file_id)
         # copy recursively so we know directories will be added before
         # their children.  There are more efficient ways than this...
-        for path, entry in entries():
+        for path, entry in entries:
             other.add(entry.copy())
         return other
 

=== modified file 'bzrlib/plugins/launchpad/__init__.py'
--- a/bzrlib/plugins/launchpad/__init__.py	2007-07-11 03:20:03 +0000
+++ b/bzrlib/plugins/launchpad/__init__.py	2007-10-24 08:12:18 +0000
@@ -14,11 +14,7 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
-"""Launchpad.net integration plugin for Bazaar
-
-To install this file, put the 'bzr_lp' directory, or a symlink to it,
-in your ~/.bazaar/plugins/ directory.
-"""
+"""Launchpad.net integration plugin for Bazaar."""
 
 # The XMLRPC server address can be overridden by setting the environment
 # variable $BZR_LP_XMLRPL_URL
@@ -84,7 +80,7 @@
             author='',
             link_bug=None,
             dry_run=False):
-        from lp_registration import (
+        from bzrlib.plugins.launchpad.lp_registration import (
             LaunchpadService, BranchRegistrationRequest, BranchBugLinkRequest,
             DryRunLaunchpadService)
         rego = BranchRegistrationRequest(branch_url=branch_url,
@@ -114,6 +110,51 @@
 
 register_command(cmd_register_branch)
 
+
+class cmd_launchpad_login(Command):
+    """Show or set the Launchpad user ID.
+
+    When communicating with Launchpad, some commands need to know your
+    Launchpad user ID.  This command can be used to set or show the
+    user ID that Bazaar will use for such communication.
+
+    :Examples:
+      Show the Launchpad ID of the current user::
+
+          bzr launchpad-login
+
+      Set the Launchpad ID of the current user to 'bob'::
+
+          bzr launchpad-login bob
+    """
+    aliases = ['lp-login']
+    takes_args = ['name?']
+    takes_options = [
+        Option('no-check',
+               "Don't check that the user name is valid."),
+        ]
+
+    def run(self, name=None, no_check=False):
+        from bzrlib.plugins.launchpad import account
+        check_account = not no_check
+
+        if name is None:
+            username = account.get_lp_login()
+            if username:
+                if check_account:
+                    account.check_lp_login(username)
+                self.outf.write(username + '\n')
+            else:
+                self.outf.write('No Launchpad user ID configured.\n')
+                return 1
+        else:
+            if check_account:
+                account.check_lp_login(name)
+            account.set_lp_login(name)
+
+register_command(cmd_launchpad_login)
+
+
 register_lazy_transport(
     'lp:',
     'bzrlib.plugins.launchpad.lp_indirect',
@@ -127,12 +168,12 @@
 def test_suite():
     """Called by bzrlib to fetch tests for this plugin"""
     from unittest import TestSuite, TestLoader
-    import test_register
-    import test_lp_indirect
+    from bzrlib.plugins.launchpad import (
+        test_register, test_lp_indirect, test_account)
 
     loader = TestLoader()
     suite = TestSuite()
-    for m in [test_register, test_lp_indirect]:
+    for m in [test_register, test_lp_indirect, test_account]:
         suite.addTests(loader.loadTestsFromModule(m))
     return suite
 

=== modified file 'bzrlib/plugins/launchpad/test_register.py'
--- a/bzrlib/plugins/launchpad/test_register.py	2007-07-04 09:27:22 +0000
+++ b/bzrlib/plugins/launchpad/test_register.py	2007-10-12 03:18:30 +0000
@@ -22,7 +22,7 @@
 from bzrlib.tests import TestCase, TestSkipped
 
 # local import
-from lp_registration import (
+from bzrlib.plugins.launchpad.lp_registration import (
         BaseRequest,
         BranchBugLinkRequest,
         BranchRegistrationRequest,

=== modified file 'bzrlib/tests/inventory_implementations/basics.py'
--- a/bzrlib/tests/inventory_implementations/basics.py	2007-09-20 07:03:33 +0000
+++ b/bzrlib/tests/inventory_implementations/basics.py	2007-10-24 15:29:18 +0000
@@ -65,6 +65,16 @@
         self.assertEqual('hello-id', ie.file_id)
         self.assertEqual('file', ie.kind)
 
+    def test_copy(self):
+        """Make sure copy() works and creates a deep copy."""
+        inv = self.make_inventory(root_id='some-tree-root')
+        ie = inv.add_path('hello', 'file', 'hello-id')
+        inv2 = inv.copy()
+        inv.root.file_id = 'some-new-root'
+        ie.name = 'file2'
+        self.assertEqual('some-tree-root', inv2.root.file_id)
+        self.assertEqual('hello', inv2['hello-id'].name)
+
     def test_is_root(self):
         """Ensure our root-checking code is accurate."""
         inv = self.make_inventory('TREE_ROOT')

=== modified file 'bzrlib/transport/__init__.py'
--- a/bzrlib/transport/__init__.py	2007-10-11 04:54:04 +0000
+++ b/bzrlib/transport/__init__.py	2007-10-24 18:19:51 +0000
@@ -146,8 +146,12 @@
 transport_list_registry = TransportListRegistry()
 
 
-def register_transport_proto(prefix, help=None, info=None, default_port=None):
+def register_transport_proto(prefix, help=None, info=None, default_port=None,
+                             register_netloc=False):
     transport_list_registry.register_transport(prefix, help, default_port)
+    if register_netloc:
+        assert prefix.endswith('://')
+        register_urlparse_netloc_protocol(prefix[:-3])
 
 
 def register_lazy_transport(prefix, module, classname):
@@ -1710,27 +1714,28 @@
 # Note that sftp:// has no default_port, because the user's ~/.ssh/config
 # can set it to arbitrary values based on hostname.
 register_transport_proto('sftp://',
-            help="Access using SFTP (most SSH servers provide SFTP).")
+            help="Access using SFTP (most SSH servers provide SFTP).",
+            register_netloc=True)
 register_lazy_transport('sftp://', 'bzrlib.transport.sftp', 'SFTPTransport')
 # Decorated http transport
 register_transport_proto('http+urllib://',
 #                help="Read-only access of branches exported on the web."
-            default_port=80)
+            default_port=80, register_netloc=True)
 register_lazy_transport('http+urllib://', 'bzrlib.transport.http._urllib',
                         'HttpTransport_urllib')
 register_transport_proto('https+urllib://',
 #                help="Read-only access of branches exported on the web using SSL."
-            default_port=443)
+            default_port=443, register_netloc=True)
 register_lazy_transport('https+urllib://', 'bzrlib.transport.http._urllib',
                         'HttpTransport_urllib')
 register_transport_proto('http+pycurl://',
 #                help="Read-only access of branches exported on the web."
-            default_port=80)
+            default_port=80, register_netloc=True)
 register_lazy_transport('http+pycurl://', 'bzrlib.transport.http._pycurl',
                         'PyCurlTransport')
 register_transport_proto('https+pycurl://',
 #                help="Read-only access of branches exported on the web using SSL."
-            default_port=443)
+            default_port=443, register_netloc=True)
 register_lazy_transport('https+pycurl://', 'bzrlib.transport.http._pycurl',
                         'PyCurlTransport')
 # Default http transports (last declared wins (if it can be imported))
@@ -1784,29 +1789,37 @@
 register_lazy_transport('vfat+',
                         'bzrlib.transport.fakevfat',
                         'FakeVFATTransportDecorator')
+
+# These two schemes were registered, but don't seem to have an actual transport
+# protocol registered
+for scheme in ['ssh', 'bzr+loopback']:
+    register_urlparse_netloc_protocol(scheme)
+del scheme
+
 register_transport_proto('bzr://',
             help="Fast access using the Bazaar smart server.",
-            default_port=4155)
+            default_port=4155, register_netloc=True)
 
 register_lazy_transport('bzr://',
                         'bzrlib.transport.remote',
                         'RemoteTCPTransport')
 register_transport_proto('bzr+http://',
 #                help="Fast access using the Bazaar smart server over HTTP."
-            default_port=80)
+            default_port=80, register_netloc=True)
 register_lazy_transport('bzr+http://',
                         'bzrlib.transport.remote',
                         'RemoteHTTPTransport')
 register_transport_proto('bzr+https://',
 #                help="Fast access using the Bazaar smart server over HTTPS."
-             )
+             register_netloc=True)
 register_lazy_transport('bzr+https://',
                         'bzrlib.transport.remote',
                         'RemoteHTTPTransport')
 # Note that bzr+ssh:// has no default_port, because the user's ~/.ssh/config
 # can set it to arbitrary values based on hostname.
 register_transport_proto('bzr+ssh://',
-            help="Fast access using the Bazaar smart server over SSH.")
+            help="Fast access using the Bazaar smart server over SSH.",
+            register_netloc=True)
 register_lazy_transport('bzr+ssh://',
                         'bzrlib.transport.remote',
                         'RemoteSSHTransport')

=== modified file 'bzrlib/transport/http/_pycurl.py'
--- a/bzrlib/transport/http/_pycurl.py	2007-10-01 08:42:16 +0000
+++ b/bzrlib/transport/http/_pycurl.py	2007-10-19 19:56:06 +0000
@@ -44,7 +44,6 @@
                            ConnectionError,
                            DependencyNotPresent)
 from bzrlib.trace import mutter
-from bzrlib.transport import register_urlparse_netloc_protocol
 from bzrlib.transport.http import (
     ca_bundle,
     _extract_headers,
@@ -96,9 +95,6 @@
 CURLE_PARTIAL_FILE = _get_pycurl_errcode('E_PARTIAL_FILE', 18)
 
 
-register_urlparse_netloc_protocol('http+pycurl')
-
-
 class PyCurlTransport(HttpTransportBase):
     """http client transport using pycurl
 

=== modified file 'bzrlib/transport/http/_urllib.py'
--- a/bzrlib/transport/http/_urllib.py	2007-08-15 04:56:08 +0000
+++ b/bzrlib/transport/http/_urllib.py	2007-10-19 19:56:06 +0000
@@ -23,7 +23,6 @@
     urlutils,
     )
 from bzrlib.trace import mutter
-from bzrlib.transport import register_urlparse_netloc_protocol
 from bzrlib.transport.http import HttpTransportBase
 # TODO: handle_response should be integrated into the _urllib2_wrappers
 from bzrlib.transport.http.response import handle_response
@@ -35,9 +34,6 @@
     )
 
 
-register_urlparse_netloc_protocol('http+urllib')
-
-
 class HttpTransport_urllib(HttpTransportBase):
     """Python urllib transport for http and https."""
 

=== modified file 'bzrlib/transport/remote.py'
--- a/bzrlib/transport/remote.py	2007-10-11 04:54:04 +0000
+++ b/bzrlib/transport/remote.py	2007-10-24 18:19:51 +0000
@@ -36,11 +36,6 @@
     )
 from bzrlib.smart import client, medium, protocol
 
-# must do this otherwise urllib can't parse the urls properly :(
-for scheme in ['ssh', 'bzr', 'bzr+loopback', 'bzr+ssh', 'bzr+http', 'bzr+https']:
-    transport.register_urlparse_netloc_protocol(scheme)
-del scheme
-
 
 # Port 4155 is the default port for bzr://, registered with IANA.
 BZR_DEFAULT_INTERFACE = '0.0.0.0'

=== modified file 'bzrlib/transport/sftp.py'
--- a/bzrlib/transport/sftp.py	2007-10-04 22:00:07 +0000
+++ b/bzrlib/transport/sftp.py	2007-10-24 18:19:51 +0000
@@ -57,7 +57,6 @@
     FileFileStream,
     _file_streams,
     local,
-    register_urlparse_netloc_protocol,
     Server,
     ssh,
     ConnectedTransport,
@@ -88,9 +87,6 @@
     from paramiko.sftp_file import SFTPFile
 
 
-register_urlparse_netloc_protocol('sftp')
-
-
 _paramiko_version = getattr(paramiko, '__version_info__', (0, 0, 0))
 # don't use prefetch unless paramiko version >= 1.5.5 (there were bugs earlier)
 _default_do_prefetch = (_paramiko_version >= (1, 5, 5))



More information about the bazaar-commits mailing list