Rev 3827: (mbp) Merge 1.9final and its sftp fixes in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Tue Nov 11 01:52:42 GMT 2008


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

------------------------------------------------------------
revno: 3827
revision-id: pqm at pqm.ubuntu.com-20081111015238-n9zq9dpfbzjhw0ml
parent: pqm at pqm.ubuntu.com-20081111011444-02hohb7ghaqd3aa2
parent: mbp at sourcefrog.net-20081111005717-m9qvlrdwqg8obh1q
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Tue 2008-11-11 01:52:38 +0000
message:
  (mbp) Merge 1.9final and its sftp fixes
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/tests/test_sftp_transport.py testsftp.py-20051027032739-247570325fec7e7e
  bzrlib/trace.py                trace.py-20050309040759-c8ed824bdcd4748a
  bzrlib/transport/http/_urllib2_wrappers.py _urllib2_wrappers.py-20060913231729-ha9ugi48ktx481ao-1
  bzrlib/transport/sftp.py       sftp.py-20051019050329-ab48ce71b7e32dfe
    ------------------------------------------------------------
    revno: 3825.1.2
    revision-id: mbp at sourcefrog.net-20081111005717-m9qvlrdwqg8obh1q
    parent: mbp at sourcefrog.net-20081110082613-gsg1fk1d6bpxy9xx
    parent: pqm at pqm.ubuntu.com-20081107064851-mva76qrw6giexd0c
    committer: Martin Pool <mbp at sourcefrog.net>
    branch nick: integration
    timestamp: Tue 2008-11-11 10:57:17 +1000
    message:
      Merge 1.9final and its sftp fixes
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzrlib/tests/test_sftp_transport.py testsftp.py-20051027032739-247570325fec7e7e
      bzrlib/trace.py                trace.py-20050309040759-c8ed824bdcd4748a
      bzrlib/transport/http/_urllib2_wrappers.py _urllib2_wrappers.py-20060913231729-ha9ugi48ktx481ao-1
      bzrlib/transport/sftp.py       sftp.py-20051019050329-ab48ce71b7e32dfe
    ------------------------------------------------------------
    revno: 3815.3.2
    revision-id: pqm at pqm.ubuntu.com-20081107064851-mva76qrw6giexd0c
    parent: pqm at pqm.ubuntu.com-20081031091201-8b83yv5co6o2uuzc
    parent: mbp at sourcefrog.net-20081107055957-mmtpo9bz0u1yc1ru
    committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
    branch nick: 1.9
    timestamp: Fri 2008-11-07 06:48:51 +0000
    message:
      (mbp) prepare 1.9final
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzrlib/__init__.py             __init__.py-20050309040759-33e65acf91bbcd5d
      bzrlib/tests/blackbox/test_breakin.py test_breakin.py-20070424043903-qyy6zm4pj3h4sbp3-1
      bzrlib/tests/http_server.py    httpserver.py-20061012142527-m1yxdj1xazsf8d7s-1
      bzrlib/tests/test_sftp_transport.py testsftp.py-20051027032739-247570325fec7e7e
      bzrlib/trace.py                trace.py-20050309040759-c8ed824bdcd4748a
      bzrlib/transport/http/_urllib2_wrappers.py _urllib2_wrappers.py-20060913231729-ha9ugi48ktx481ao-1
      bzrlib/transport/sftp.py       sftp.py-20051019050329-ab48ce71b7e32dfe
    ------------------------------------------------------------
    revno: 3815.2.7
    revision-id: mbp at sourcefrog.net-20081107055957-mmtpo9bz0u1yc1ru
    parent: mbp at sourcefrog.net-20081107055916-ky49y104205bnpwp
    committer: Martin Pool <mbp at sourcefrog.net>
    branch nick: prepare-1.9
    timestamp: Fri 2008-11-07 16:59:57 +1100
    message:
      Prepare 1.9final
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzrlib/__init__.py             __init__.py-20050309040759-33e65acf91bbcd5d
    ------------------------------------------------------------
    revno: 3815.2.6
    revision-id: mbp at sourcefrog.net-20081107055916-ky49y104205bnpwp
    parent: mbp at sourcefrog.net-20081107054139-zw6p9ng94dhgk2sz
    parent: pqm at pqm.ubuntu.com-20081031091201-8b83yv5co6o2uuzc
    committer: Martin Pool <mbp at sourcefrog.net>
    branch nick: prepare-1.9
    timestamp: Fri 2008-11-07 16:59:16 +1100
    message:
      Merge fix for #293440
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
    ------------------------------------------------------------
    revno: 3815.2.5
    revision-id: mbp at sourcefrog.net-20081107054139-zw6p9ng94dhgk2sz
    parent: mbp at sourcefrog.net-20081107053909-kwq9p72djtac71dm
    parent: john at arbash-meinel.com-20081101144447-vbmq05112a8lewcn
    committer: Martin Pool <mbp at sourcefrog.net>
    branch nick: prepare-1.9
    timestamp: Fri 2008-11-07 16:41:39 +1100
    message:
      Cope if .bzr.log can't be opened
    modified:
      bzrlib/trace.py                trace.py-20050309040759-c8ed824bdcd4748a
        ------------------------------------------------------------
        revno: 3805.2.4
        revision-id: john at arbash-meinel.com-20081101144447-vbmq05112a8lewcn
        parent: john at arbash-meinel.com-20081030141826-6267bwt9p372nrsi
        committer: John Arbash Meinel <john at arbash-meinel.com>
        branch nick: jam-integration
        timestamp: Sat 2008-11-01 09:44:47 -0500
        message:
          Handle when _open_bzr_log returns None.
        modified:
          bzrlib/trace.py                trace.py-20050309040759-c8ed824bdcd4748a
    ------------------------------------------------------------
    revno: 3815.2.4
    revision-id: mbp at sourcefrog.net-20081107053909-kwq9p72djtac71dm
    parent: mbp at sourcefrog.net-20081107052644-vdkxw54zv42s9f6n
    committer: Martin Pool <mbp at sourcefrog.net>
    branch nick: prepare-1.9
    timestamp: Fri 2008-11-07 16:39:09 +1100
    message:
      merge fix for out-of-order SFTP readv
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzrlib/tests/test_sftp_transport.py testsftp.py-20051027032739-247570325fec7e7e
      bzrlib/transport/sftp.py       sftp.py-20051019050329-ab48ce71b7e32dfe
    ------------------------------------------------------------
    revno: 3815.2.3
    revision-id: mbp at sourcefrog.net-20081107052644-vdkxw54zv42s9f6n
    parent: mbp at sourcefrog.net-20081031080435-goipeym2un70szr9
    committer: Martin Pool <mbp at sourcefrog.net>
    branch nick: prepare-1.9
    timestamp: Fri 2008-11-07 16:26:44 +1100
    message:
      merge fix for #293054, ssl on python2.6
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzrlib/tests/blackbox/test_breakin.py test_breakin.py-20070424043903-qyy6zm4pj3h4sbp3-1
      bzrlib/tests/http_server.py    httpserver.py-20061012142527-m1yxdj1xazsf8d7s-1
      bzrlib/transport/http/_urllib2_wrappers.py _urllib2_wrappers.py-20060913231729-ha9ugi48ktx481ao-1
=== modified file 'NEWS'
--- a/NEWS	2008-11-07 18:10:32 +0000
+++ b/NEWS	2008-11-11 00:57:17 +0000
@@ -35,7 +35,7 @@
   INTERNALS:
 
 
-bzr 1.9 2008-10-31
+bzr 1.9 2008-11-07
 ------------------
 
 This release of Bazaar adds a new repository format, ``1.9``, with smaller
@@ -45,6 +45,20 @@
 protocol, makes annotate faster, and uses less memory when making
 checkouts or pulling large amounts of data.
 
+  BUG FIXES:
+
+   * Fix "invalid property value 'branch-nick' for None" regression with
+     branches bound to svn branches.  (Martin Pool, #293440)
+
+   * Fix SSL/https on Python2.6.  (Vincent Ladeuil, #293054)
+
+   * ``SFTPTransport.readv()`` had a bug when requests were out-of-order.
+     This only triggers some-of-the-time on Knit format repositories.
+     (John Arbash Meinel, #293746)
+
+
+bzr 1.9rc1 2008-10-31
+---------------------
 
   NEW FEATURES:
 

=== modified file 'bzrlib/tests/test_sftp_transport.py'
--- a/bzrlib/tests/test_sftp_transport.py	2008-10-15 18:59:07 +0000
+++ b/bzrlib/tests/test_sftp_transport.py	2008-11-07 05:39:09 +0000
@@ -463,6 +463,17 @@
         self.assertAlmostEqual(t2 - t1, 100 + 7)
 
 
+class ReadvFile(object):
+    """An object that acts like Paramiko's SFTPFile.readv()"""
+
+    def __init__(self, data):
+        self._data = data
+
+    def readv(self, requests):
+        for start, length in requests:
+            yield self._data[start:start+length]
+
+
 class Test_SFTPReadvHelper(tests.TestCase):
 
     def checkGetRequests(self, expected_requests, offsets):
@@ -485,6 +496,25 @@
                               [(0, 40000), (40000, 100), (40100, 1900),
                                (42000, 24000)])
 
+    def checkRequestAndYield(self, expected, data, offsets):
+        helper = _mod_sftp._SFTPReadvHelper(offsets, 'artificial_test')
+        data_f = ReadvFile(data)
+        result = list(helper.request_and_yield_offsets(data_f))
+        self.assertEqual(expected, result)
+
+    def test_request_and_yield_offsets(self):
+        data = 'abcdefghijklmnopqrstuvwxyz'
+        self.checkRequestAndYield([(0, 'a'), (5, 'f'), (10, 'klm')], data,
+                                  [(0, 1), (5, 1), (10, 3)])
+        # Should combine requests, and split them again
+        self.checkRequestAndYield([(0, 'a'), (1, 'b'), (10, 'klm')], data,
+                                  [(0, 1), (1, 1), (10, 3)])
+        # Out of order requests. The requests should get combined, but then be
+        # yielded out-of-order. We also need one that is at the end of a
+        # previous range. See bug #293746
+        self.checkRequestAndYield([(0, 'a'), (10, 'k'), (4, 'efg'), (1, 'bcd')],
+                                  data, [(0, 1), (10, 1), (4, 3), (1, 3)])
+
 
 class TestUsesAuthConfig(TestCaseWithSFTPServer):
     """Test that AuthenticationConfig can supply default usernames."""

=== modified file 'bzrlib/trace.py'
--- a/bzrlib/trace.py	2008-10-30 14:18:26 +0000
+++ b/bzrlib/trace.py	2008-11-01 14:44:47 +0000
@@ -230,6 +230,7 @@
     # TODO: What should happen if we fail to open the trace file?  Maybe the
     # objects should be pointed at /dev/null or the equivalent?  Currently
     # returns None which will cause failures later.
+    return None
 
 
 def enable_default_logging():
@@ -250,7 +251,8 @@
                                            timezone='local')
     # create encoded wrapper around stderr
     bzr_log_file = _open_bzr_log()
-    bzr_log_file.write(start_time.encode('utf-8') + '\n')
+    if bzr_log_file is not None:
+        bzr_log_file.write(start_time.encode('utf-8') + '\n')
     push_log_file(bzr_log_file,
         r'[%(process)5d] %(asctime)s.%(msecs)03d %(levelname)s: %(message)s',
         r'%Y-%m-%d %H:%M:%S')

=== modified file 'bzrlib/transport/http/_urllib2_wrappers.py'
--- a/bzrlib/transport/http/_urllib2_wrappers.py	2008-11-07 14:36:34 +0000
+++ b/bzrlib/transport/http/_urllib2_wrappers.py	2008-11-11 00:57:17 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2006, 2007 Canonical Ltd
+# Copyright (C) 2006, 2007, 2008 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

=== modified file 'bzrlib/transport/sftp.py'
--- a/bzrlib/transport/sftp.py	2008-10-15 18:59:07 +0000
+++ b/bzrlib/transport/sftp.py	2008-11-07 05:39:09 +0000
@@ -295,7 +295,8 @@
             # get the previous node
             while True:
                 idx = bisect.bisect_left(data_chunks, (cur_offset,))
-                if data_chunks[idx][0] == cur_offset: # The data starts here
+                if idx < len(data_chunks) and data_chunks[idx][0] == cur_offset:
+                    # The data starts here
                     data = data_chunks[idx][1][:cur_size]
                 elif idx > 0:
                     # The data is in a portion of a previous page




More information about the bazaar-commits mailing list