Rev 3998: (jam) Merge bzr-1.12rc1 back into bzr.dev in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Tue Feb 10 20:13:37 GMT 2009


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

------------------------------------------------------------
revno: 3998
revision-id: pqm at pqm.ubuntu.com-20090210201334-ovwbsvsqvsozwomf
parent: pqm at pqm.ubuntu.com-20090210104600-o9xd7lm1d91067oj
parent: john at arbash-meinel.com-20090210193316-muszy92rqm7xvs7k
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Tue 2009-02-10 20:13:34 +0000
message:
  (jam) Merge bzr-1.12rc1 back into bzr.dev
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzr                            bzr.py-20050313053754-5485f144c7006fa6
  bzrlib/__init__.py             __init__.py-20050309040759-33e65acf91bbcd5d
  bzrlib/bundle/__init__.py      changeset.py-20050513021216-b02ab57fb9738913
  bzrlib/tests/test_http.py      testhttp.py-20051018020158-b2eef6e867c514d9
  bzrlib/tests/test_read_bundle.py test_read_bundle.py-20060615211421-ud8cwr1ulgd914zf-1
  bzrlib/transport/http/_urllib2_wrappers.py _urllib2_wrappers.py-20060913231729-ha9ugi48ktx481ao-1
    ------------------------------------------------------------
    revno: 3997.1.2
    revision-id: john at arbash-meinel.com-20090210193316-muszy92rqm7xvs7k
    parent: john at arbash-meinel.com-20090210192925-6pexwm5u4w6k5vpv
    committer: John Arbash Meinel <john at arbash-meinel.com>
    branch nick: jam-integration
    timestamp: Tue 2009-02-10 13:33:16 -0600
    message:
      Move the new work out of bzr-1.12 and into IN DEVELOPMENT
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
    ------------------------------------------------------------
    revno: 3997.1.1
    revision-id: john at arbash-meinel.com-20090210192925-6pexwm5u4w6k5vpv
    parent: pqm at pqm.ubuntu.com-20090210104600-o9xd7lm1d91067oj
    parent: pqm at pqm.ubuntu.com-20090210172934-dzt1iz4ctlhcc8b6
    committer: John Arbash Meinel <john at arbash-meinel.com>
    branch nick: jam-integration
    timestamp: Tue 2009-02-10 13:29:25 -0600
    message:
      Merge bzr.1.12rc1 back into bzr.dev
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzr                            bzr.py-20050313053754-5485f144c7006fa6
      bzrlib/__init__.py             __init__.py-20050309040759-33e65acf91bbcd5d
      bzrlib/bundle/__init__.py      changeset.py-20050513021216-b02ab57fb9738913
      bzrlib/tests/test_http.py      testhttp.py-20051018020158-b2eef6e867c514d9
      bzrlib/tests/test_read_bundle.py test_read_bundle.py-20060615211421-ud8cwr1ulgd914zf-1
      bzrlib/transport/http/_urllib2_wrappers.py _urllib2_wrappers.py-20060913231729-ha9ugi48ktx481ao-1
    ------------------------------------------------------------
    revno: 3995.3.2
    revision-id: pqm at pqm.ubuntu.com-20090210172934-dzt1iz4ctlhcc8b6
    parent: pqm at pqm.ubuntu.com-20090210100738-sf13wwla8iwa02bb
    parent: john at arbash-meinel.com-20090210164322-7qsn8ou1z9cxgfx5
    committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
    branch nick: 1.12
    timestamp: Tue 2009-02-10 17:29:34 +0000
    message:
      (mbp) Release 1.12rc1
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzrlib/__init__.py             __init__.py-20050309040759-33e65acf91bbcd5d
        ------------------------------------------------------------
        revno: 3995.4.1
        revision-id: john at arbash-meinel.com-20090210164322-7qsn8ou1z9cxgfx5
        parent: pqm at pqm.ubuntu.com-20090210100738-sf13wwla8iwa02bb
        author: Martin Pool <mbp at sourcefrog.net>
        committer: John Arbash Meinel <john at arbash-meinel.com>
        branch nick: 1.12-rc1-release
        timestamp: Tue 2009-02-10 10:43:22 -0600
        message:
          Release 1.12rc1
        modified:
          NEWS                           NEWS-20050323055033-4e00b5db738777ff
          bzrlib/__init__.py             __init__.py-20050309040759-33e65acf91bbcd5d
    ------------------------------------------------------------
    revno: 3995.3.1
    revision-id: pqm at pqm.ubuntu.com-20090210100738-sf13wwla8iwa02bb
    parent: pqm at pqm.ubuntu.com-20090210045418-u1c0p4zpnp6nna3n
    parent: mbp at sourcefrog.net-20090210092440-cxbs2qpslelfgfzc
    committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
    branch nick: 1.12
    timestamp: Tue 2009-02-10 10:07:38 +0000
    message:
      (mbp) merge fix for SSLFile readline problem
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzrlib/bundle/__init__.py      changeset.py-20050513021216-b02ab57fb9738913
      bzrlib/tests/test_http.py      testhttp.py-20051018020158-b2eef6e867c514d9
      bzrlib/tests/test_read_bundle.py test_read_bundle.py-20060615211421-ud8cwr1ulgd914zf-1
      bzrlib/transport/http/_urllib2_wrappers.py _urllib2_wrappers.py-20060913231729-ha9ugi48ktx481ao-1
    ------------------------------------------------------------
    revno: 3995.2.2
    revision-id: mbp at sourcefrog.net-20090210092440-cxbs2qpslelfgfzc
    parent: mbp at sourcefrog.net-20090210063537-6k1fpm1pm4vpnhzq
    committer: Martin Pool <mbp at sourcefrog.net>
    branch nick: prepare-1.12
    timestamp: Tue 2009-02-10 20:24:40 +1100
    message:
      Cope with read_bundle_from_url deprecation in test_http
    modified:
      bzrlib/tests/test_http.py      testhttp.py-20051018020158-b2eef6e867c514d9
    ------------------------------------------------------------
    revno: 3995.2.1
    revision-id: mbp at sourcefrog.net-20090210063537-6k1fpm1pm4vpnhzq
    parent: pqm at pqm.ubuntu.com-20090210045418-u1c0p4zpnp6nna3n
    parent: v.ladeuil+lp at free.fr-20090209182543-nb0220ksr5xa20pg
    committer: Martin Pool <mbp at sourcefrog.net>
    branch nick: prepare-1.12
    timestamp: Tue 2009-02-10 17:35:37 +1100
    message:
      merge SSLFile readline fix
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzrlib/bundle/__init__.py      changeset.py-20050513021216-b02ab57fb9738913
      bzrlib/tests/test_read_bundle.py test_read_bundle.py-20060615211421-ud8cwr1ulgd914zf-1
      bzrlib/transport/http/_urllib2_wrappers.py _urllib2_wrappers.py-20060913231729-ha9ugi48ktx481ao-1
    ------------------------------------------------------------
    revno: 3988.2.1
    revision-id: v.ladeuil+lp at free.fr-20090209182543-nb0220ksr5xa20pg
    parent: pqm at pqm.ubuntu.com-20090209040048-4w0lmgdasmdw5xdn
    committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
    branch nick: httplib-broken-readline
    timestamp: Mon 2009-02-09 19:25:43 +0100
    message:
      Workaround SSLFile wrong readline prototype and fix bogus tests.
      
      * bzrlib/tests/test_read_bundle.py:
      (load_tests): Not all tests are parametrized.
      (TestDeprecations): Deprecate read_bundle_from_url.
      (TestReadBundleFromURL.test_read_mergeable_from_url): Test
      read_mergeable_from_url instead of read_bundle_from_url which has
      no possible_transports parameter and is deprecated.
      (TestReadBundleFromURL.test_read_mergeable_respects_possible_transports):
      Fix the test so that it respects the transport class it's supposed
      to use.
      
      * bzrlib/transport/http/_urllib2_wrappers.py:
      (_ReportingFileSocket.readline): Workaround bug in httplib for
      python-2.4 and 2.5.
    modified:
      bzrlib/bundle/__init__.py      changeset.py-20050513021216-b02ab57fb9738913
      bzrlib/tests/test_read_bundle.py test_read_bundle.py-20060615211421-ud8cwr1ulgd914zf-1
      bzrlib/transport/http/_urllib2_wrappers.py _urllib2_wrappers.py-20060913231729-ha9ugi48ktx481ao-1
=== modified file 'NEWS'
--- a/NEWS	2009-02-10 05:47:45 +0000
+++ b/NEWS	2009-02-10 19:33:16 +0000
@@ -4,9 +4,26 @@
 
 .. contents::
 
+
 IN DEVELOPMENT
 --------------
 
+  IMPROVEMENTS:
+
+    * ``bzr branch`` now has a ``--no-tree`` option which turns off the
+      generation of a working tree in the new branch.
+      (Daniel Watkins, John Klinger, #273993)
+
+
+bzr 1.12rc1 "1234567890" 2009-02-10
+-----------------------------------
+
+This release of Bazaar contains many improvements to the speed and
+functionality of ``bzr log`` and the display of logged revisions by ``bzr
+status``.  bzr now also gives a better indication of progress, both in the
+way operations are drawn onto a text terminal, and by showing the rate of
+network IO.
+
   COMPATIBILITY BREAKS:
 
     * By default, ``bzr status`` after a merge now shows just the pending
@@ -31,9 +48,9 @@
 
   NEW FEATURES:
 
-    * Add support for filtering `bzr missing` on revisions.  Remote revisions
-      can be filtered using `bzr missing -r -20..-10` and local revisions can
-      be filtered using `bzr missing --my-revision -20..-10`.
+    * Add support for filtering ``bzr missing`` on revisions.  Remote revisions
+      can be filtered using ``bzr missing -r -20..-10`` and local revisions can
+      be filtered using ``bzr missing --my-revision -20..-10``.
       (Marius Kruger)
 
     * ``bzr log -p`` displays the patch diff for each revision.
@@ -56,10 +73,6 @@
     * ``bzr add`` more clearly communicates success vs failure.
       (Daniel Watkins)
 
-    * ``bzr branch`` now has a ``--no-tree`` option which turns off the
-      generation of a working tree in the new branch.
-      (Daniel Watkins, John Klinger, #273993)
-
     * ``bzr init`` will now print a little less verbose output.
       (Marius Kruger)
 
@@ -152,6 +165,7 @@
 
     * ``ProgressBarStack`` is deprecated; instead use
       ``ui_factory.nested_progress_bar`` to create new progress bars.
+      (Martin Pool)
 
     * ForeignVcsMapping() now requires a ForeignVcs object as first
       argument. (Jelmer Vernooij)
@@ -159,6 +173,9 @@
     * ForeignVcsMapping.show_foreign_revid() has been moved to
       ForeignVcs. (Jelmer Vernooij)
 
+    * ``read_bundle_from_url`` is deprecated in favor of
+      ``read_mergeable_from_url``.  (Vincent Ladeuil)
+
     * Revision specifiers are now registered in
       ``bzrlib.revisionspec.revspec_registry``, and the old list of 
       revisionspec classes (``bzrlib.revisionspec.SPEC_TYPES``) has been
@@ -168,8 +185,6 @@
       same but code that provides a new UI or progress bar class may
       need to be updated.  (Martin Pool)
 
-  TESTING:
-
   INTERNALS:
 
     * Default User Interface (UI) is CLIUIFactory when bzr runs in a dumb

=== modified file 'bzr'
--- a/bzr	2009-01-13 03:11:04 +0000
+++ b/bzr	2009-02-10 19:29:25 +0000
@@ -22,7 +22,7 @@
 import sys
 
 # update this on each release
-_script_version = (1, 12, 0)
+_script_version = (1, 13, 0)
 
 if __doc__ is None:
     print "bzr does not support python -OO."

=== modified file 'bzrlib/__init__.py'
--- a/bzrlib/__init__.py	2009-01-26 17:04:21 +0000
+++ b/bzrlib/__init__.py	2009-02-10 19:29:25 +0000
@@ -50,7 +50,7 @@
 # Python version 2.0 is (2, 0, 0, 'final', 0)."  Additionally we use a
 # releaselevel of 'dev' for unreleased under-development code.
 
-version_info = (1, 12, 0, 'dev', 0)
+version_info = (1, 13, 0, 'dev', 0)
 
 
 # API compatibility version: bzrlib is currently API compatible with 1.11.

=== modified file 'bzrlib/bundle/__init__.py'
--- a/bzrlib/bundle/__init__.py	2008-10-01 05:40:45 +0000
+++ b/bzrlib/bundle/__init__.py	2009-02-09 18:25:43 +0000
@@ -14,6 +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
 
+from bzrlib.symbol_versioning import deprecated_function, deprecated_in
 from bzrlib.lazy_import import lazy_import
 lazy_import(globals(), """
 from bzrlib import (
@@ -29,6 +30,7 @@
 from bzrlib.trace import note
 
 
+ at deprecated_function(deprecated_in((1, 12, 0)))
 def read_bundle_from_url(url):
     return read_mergeable_from_url(url, _do_directive=False)
 

=== modified file 'bzrlib/tests/test_http.py'
--- a/bzrlib/tests/test_http.py	2009-01-30 00:49:41 +0000
+++ b/bzrlib/tests/test_http.py	2009-02-10 09:24:40 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2005, 2006, 2007, 2008 Canonical Ltd
+# Copyright (C) 2005, 2006, 2007, 2008, 2009 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
@@ -44,6 +44,9 @@
     ui,
     urlutils,
     )
+from bzrlib.symbol_versioning import (
+    deprecated_in,
+    )
 from bzrlib.tests import (
     http_server,
     http_utils,
@@ -1260,7 +1263,8 @@
     def test_read_redirected_bundle_from_url(self):
         from bzrlib.bundle import read_bundle_from_url
         url = self.old_transport.abspath('bundle')
-        bundle = read_bundle_from_url(url)
+        bundle = self.applyDeprecated(deprecated_in((1, 12, 0)),
+                read_bundle_from_url, url)
         # If read_bundle_from_url was successful we get an empty bundle
         self.assertEqual([], bundle.revisions)
 

=== modified file 'bzrlib/tests/test_read_bundle.py'
--- a/bzrlib/tests/test_read_bundle.py	2008-04-01 19:30:25 +0000
+++ b/bzrlib/tests/test_read_bundle.py	2009-02-09 18:25:43 +0000
@@ -23,6 +23,7 @@
 from bzrlib.bundle.serializer import write_bundle
 import bzrlib.bzrdir
 import bzrlib.errors as errors
+from bzrlib.symbol_versioning import deprecated_in
 from bzrlib import tests
 from bzrlib.tests.test_transport import TestTransportImplementation
 from bzrlib.tests.test_transport_implementations import TransportTestProviderAdapter
@@ -34,9 +35,15 @@
 def load_tests(standard_tests, module, loader):
     """Multiply tests for tranport implementations."""
     result = loader.suiteClass()
+    transport_tests, remaining_tests = tests.split_suite_by_condition(
+        standard_tests, tests.condition_isinstance((TestReadBundleFromURL)))
+
     adapter = TransportTestProviderAdapter()
-    for test in tests.iter_suite_tests(standard_tests):
-        result.addTests(adapter.adapt(test))
+    tests.adapt_tests(transport_tests, adapter, result)
+
+    # No parametrization for the remaining tests
+    result.addTests(remaining_tests)
+
     return result
 
 
@@ -60,6 +67,25 @@
     return out, wt
 
 
+class TestDeprecations(tests.TestCaseInTempDir):
+
+    def create_test_bundle(self):
+        out, wt = create_bundle_file(self)
+        f = open('test_bundle', 'wb')
+        f.write(out.getvalue())
+        f.close()
+        return wt
+
+    def test_read_bundle_from_url_deprecated(self):
+        wt = self.create_test_bundle()
+        t = bzrlib.transport.get_transport(self.test_dir)
+        url = t.abspath('test_bundle')
+        self.callDeprecated([deprecated_in((1, 12, 0))
+                             % 'bzrlib.bundle.read_bundle_from_url'],
+                            bzrlib.bundle.read_bundle_from_url,
+                            url)
+
+
 class TestReadBundleFromURL(TestTransportImplementation):
     """Test that read_bundle works properly across multiple transports"""
 
@@ -77,13 +103,20 @@
             self.log('Put to: %s', self.get_url('test_bundle'))
         return wt
 
-    def test_read_bundle_from_url(self):
+    def test_read_mergeable_from_url(self):
         self._captureVar('BZR_NO_SMART_VFS', None)
         wt = self.create_test_bundle()
         if wt is None:
             return
-        info = bzrlib.bundle.read_bundle_from_url(
-                    unicode(self.get_url('test_bundle')))
+        # read_mergeable_from_url will invoke get_transport which may *not*
+        # respect self._transport (i.e. returns a transport that is different
+        # from the one we want to test, so we must inject a correct transport
+        # into possible_transports first.
+        t = self.get_transport('test_bundle')
+        possible_transports = [t]
+        info = bzrlib.bundle.read_mergeable_from_url(
+                    unicode(self.get_url('test_bundle')),
+                    possible_transports=possible_transports)
         revision = info.real_revisions[-1]
         self.assertEqual('commit-1', revision.revision_id)
 
@@ -95,19 +128,28 @@
         if wt is None:
             return
 
-        self.assertRaises(errors.NotABundle, 
-            bzrlib.bundle.read_bundle_from_url, 
+        self.assertRaises(errors.NotABundle,
+            bzrlib.bundle.read_mergeable_from_url,
             self.get_url('tree'))
-        self.assertRaises(errors.NotABundle, 
-            bzrlib.bundle.read_bundle_from_url, 
+        self.assertRaises(errors.NotABundle,
+            bzrlib.bundle.read_mergeable_from_url,
             self.get_url('tree/a'))
 
-    def test_read_mergeable_populates_possible_transports(self):
+    def test_read_mergeable_respects_possible_transports(self):
+        t = self.get_transport('test_bundle')
+        if not isinstance(t, bzrlib.transport.ConnectedTransport):
+            # There is no point testing transport reuse for not connected
+            # transports (the test will fail even).
+            return
         self._captureVar('BZR_NO_SMART_VFS', None)
         wt = self.create_test_bundle()
         if wt is None:
             return
-        possible_transports = []
+        # read_mergeable_from_url will invoke get_transport which may *not*
+        # respect self._transport (i.e. returns a transport that is different
+        # from the one we want to test, so we must inject a correct transport
+        # into possible_transports first.
+        possible_transports = [t]
         url = unicode(self.get_url('test_bundle'))
         info = bzrlib.bundle.read_mergeable_from_url(url,
             possible_transports=possible_transports)

=== modified file 'bzrlib/transport/http/_urllib2_wrappers.py'
--- a/bzrlib/transport/http/_urllib2_wrappers.py	2009-01-29 14:27:28 +0000
+++ b/bzrlib/transport/http/_urllib2_wrappers.py	2009-02-09 18:25:43 +0000
@@ -79,8 +79,13 @@
         self._report_activity(len(s), 'read')
         return s
 
-    def readline(self, size=-1):
-        s = self.filesock.readline(size)
+    def readline(self):
+        # This should be readline(self, size=-1), but httplib in python 2.4 and
+        #  2.5 defines a SSLFile wrapper whose readline method lacks the size
+        #  parameter.  So until we drop support for 2.4 and 2.5 and since we
+        #  don't *need* the size parameter we'll stay with readline(self)
+        #  --  vila 20090209
+        s = self.filesock.readline()
         self._report_activity(len(s), 'read')
         return s
 




More information about the bazaar-commits mailing list