Rev 2877: merge bzr+https patch from johnf and add a basic test (mbp) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Wed Oct 3 04:49:44 BST 2007


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

------------------------------------------------------------
revno: 2877
revision-id: pqm at pqm.ubuntu.com-20071003034943-yikn2d3l6cnjb322
parent: pqm at pqm.ubuntu.com-20071003030315-z5o8ig35uhhgckbp
parent: mbp at sourcefrog.net-20071003031453-9j9md6616pnft5lx
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Wed 2007-10-03 04:49:43 +0100
message:
  merge bzr+https patch from johnf and add a basic test (mbp)
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/tests/test_smart_transport.py test_ssh_transport.py-20060608202016-c25gvf1ob7ypbus6-2
  bzrlib/transport/__init__.py   transport.py-20050711165921-4978aa7ce1285ad5
  bzrlib/transport/remote.py     ssh.py-20060608202016-c25gvf1ob7ypbus6-1
    ------------------------------------------------------------
    revno: 2814.2.3
    merged: mbp at sourcefrog.net-20071003031453-9j9md6616pnft5lx
    parent: mbp at sourcefrog.net-20071003025616-tvpxy65fdc9safgb
    parent: pqm at pqm.ubuntu.com-20071003030315-z5o8ig35uhhgckbp
    committer: Martin Pool <mbp at sourcefrog.net>
    branch nick: integration
    timestamp: Wed 2007-10-03 13:14:53 +1000
    message:
      merge news
    ------------------------------------------------------------
    revno: 2814.2.2
    merged: mbp at sourcefrog.net-20071003025616-tvpxy65fdc9safgb
    parent: mbp at sourcefrog.net-20070912012921-x905ro1jgeiddlsm
    parent: johnf at inodes.org-20070726063507-po6ghlf7lj389gjd
    committer: Martin Pool <mbp at sourcefrog.net>
    branch nick: integration
    timestamp: Wed 2007-10-03 12:56:16 +1000
    message:
      merge bzr+https patch from johnf and add a basic test
    ------------------------------------------------------------
    revno: 2651.1.1
    merged: johnf at inodes.org-20070726063507-po6ghlf7lj389gjd
    parent: pqm at pqm.ubuntu.com-20070725024725-x592w4y7gdqxv81x
    committer: John Ferlito <johnf at inodes.org>
    branch nick: bzr.dev
    timestamp: Thu 2007-07-26 16:35:07 +1000
    message:
      bzr+https support
=== modified file 'NEWS'
--- a/NEWS	2007-10-03 02:10:09 +0000
+++ b/NEWS	2007-10-03 03:14:53 +0000
@@ -59,6 +59,9 @@
 
   IMPROVEMENTS:
 
+   * ``bzr+https://`` smart server across https now supported. 
+     (John Ferlito, Martin Pool, #128456)
+
    * Mutt is now a supported mail client; set ``mail_client=mutt`` in your
      bazaar.conf and ``send`` will use mutt. (Keir Mierle)
 

=== modified file 'bzrlib/tests/test_smart_transport.py'
--- a/bzrlib/tests/test_smart_transport.py	2007-08-02 06:40:58 +0000
+++ b/bzrlib/tests/test_smart_transport.py	2007-10-03 02:56:16 +0000
@@ -1208,6 +1208,14 @@
         self.assertIsInstance(t, remote.RemoteSSHTransport)
         self.assertEqual('example.com', t._host)
 
+    def test_bzr_https(self):
+        # https://bugs.launchpad.net/bzr/+bug/128456
+        t = get_transport('bzr+https://example.com/path')
+        self.assertIsInstance(t, remote.RemoteHTTPTransport)
+        self.assertStartsWith(
+            t._http_transport.base,
+            'https://')
+
 
 class TestRemoteTransport(tests.TestCase):
         

=== modified file 'bzrlib/transport/__init__.py'
--- a/bzrlib/transport/__init__.py	2007-09-24 20:13:29 +0000
+++ b/bzrlib/transport/__init__.py	2007-10-03 03:14:53 +0000
@@ -1703,6 +1703,12 @@
 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_lazy_transport('bzr+https://',
+                        'bzrlib.transport.remote',
+                        'RemoteHTTPTransport')
 register_transport_proto('bzr+ssh://',
             help="Fast access using the Bazaar smart server over SSH.")
 register_lazy_transport('bzr+ssh://',

=== modified file 'bzrlib/transport/remote.py'
--- a/bzrlib/transport/remote.py	2007-09-24 20:13:29 +0000
+++ b/bzrlib/transport/remote.py	2007-10-03 03:14:53 +0000
@@ -36,7 +36,7 @@
 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']:
+for scheme in ['ssh', 'bzr', 'bzr+loopback', 'bzr+ssh', 'bzr+http', 'bzr+https']:
     transport.register_urlparse_netloc_protocol(scheme)
 del scheme
 
@@ -484,7 +484,7 @@
     """
 
     def __init__(self, base, _from_transport=None, http_transport=None):
-        assert base.startswith('bzr+http://')
+        assert ( base.startswith('bzr+http://') or base.startswith('bzr+https://') )
 
         if http_transport is None:
             # FIXME: the password may be lost here because it appears in the




More information about the bazaar-commits mailing list