Rev 5642: (vila) Merge 2.3 into trunk including fix for lp:707075. (Max Bowsher) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Thu Feb 3 07:59:50 UTC 2011


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

------------------------------------------------------------
revno: 5642 [merge]
revision-id: pqm at pqm.ubuntu.com-20110203075947-l52516mt7wsqryi7
parent: pqm at pqm.ubuntu.com-20110203022257-caoghu6higq98tak
parent: maxb at f2s.com-20110203051346-r2yxauojo6b2umqi
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Thu 2011-02-03 07:59:47 +0000
message:
  (vila) Merge 2.3 into trunk including fix for lp:707075. (Max Bowsher)
modified:
  bzrlib/plugins/launchpad/lp_api.py lp_api.py-20090704082908-79il6zl4gugwl3wz-1
  bzrlib/status.py               status.py-20050505062338-431bfa63ec9b19e6
  bzrlib/tests/blackbox/test_status.py teststatus.py-20050712014354-508855eb9f29f7dc
  doc/en/release-notes/bzr-2.2.txt bzr2.2.txt-20101008081016-21wd86gpfhllpue3-39
=== modified file 'bzrlib/plugins/launchpad/lp_api.py'
--- a/bzrlib/plugins/launchpad/lp_api.py	2011-01-28 11:53:25 +0000
+++ b/bzrlib/plugins/launchpad/lp_api.py	2011-02-03 05:13:46 +0000
@@ -47,17 +47,7 @@
     STAGING_SERVICE_ROOT,
     Launchpad,
     )
-try:
-    from launchpadlib import uris
-except ImportError:
-    # Create a minimal object so the getattr() calls below fail gently and
-    # provide default values
-    uris = object()
 
-LPNET_SERVICE_ROOT = getattr(uris, 'LPNET_SERVICE_ROOT',
-                             'https://api.launchpad.net/beta/')
-QASTAGING_SERVICE_ROOT = getattr(uris, 'QASTAGING_SERVICE_ROOT',
-                                 'https://api.qastaging.launchpad.net/')
 
 # Declare the minimum version of launchpadlib that we need in order to work.
 # 1.5.1 is the version of launchpadlib packaged in Ubuntu 9.10, the most
@@ -84,11 +74,27 @@
             installed_version, installed_version)
 
 
+# The older versions of launchpadlib only provided service root constants for
+# edge and staging, whilst newer versions drop edge. Therefore service root
+# URIs for which we do not always have constants are derived from the staging
+# one, which does always exist.
+#
+# It is necessary to derive, rather than use hardcoded URIs because
+# launchpadlib <= 1.5.4 requires service root URIs that end in a path of
+# /beta/, whilst launchpadlib >= 1.5.5 requires service root URIs with no path
+# info.
+#
+# Once we have a hard dependency on launchpadlib >= 1.5.4 we can replace all of
+# bzr's local knowledge of individual Launchpad instances with use of the
+# launchpadlib.uris module.
 LAUNCHPAD_API_URLS = {
-    'production': LPNET_SERVICE_ROOT,
-    'qastaging': QASTAGING_SERVICE_ROOT,
+    'production': STAGING_SERVICE_ROOT.replace('api.staging.launchpad.net',
+        'api.launchpad.net'),
+    'qastaging': STAGING_SERVICE_ROOT.replace('api.staging.launchpad.net',
+        'api.qastaging.launchpad.net'),
     'staging': STAGING_SERVICE_ROOT,
-    'dev': 'https://api.launchpad.dev/beta/',
+    'dev': STAGING_SERVICE_ROOT.replace('api.staging.launchpad.net',
+        'api.launchpad.dev'),
     }
 
 
@@ -199,7 +205,7 @@
         if str(launchpad._root_uri) == STAGING_SERVICE_ROOT:
             return url.replace('bazaar.launchpad.net',
                                'bazaar.staging.launchpad.net')
-        elif str(launchpad._root_uri) == QASTAGING_SERVICE_ROOT:
+        elif str(launchpad._root_uri) == LAUNCHPAD_API_URLS['qastaging']:
             return url.replace('bazaar.launchpad.net',
                                'bazaar.qastaging.launchpad.net')
         return url

=== modified file 'bzrlib/status.py'
--- a/bzrlib/status.py	2010-10-18 21:34:05 +0000
+++ b/bzrlib/status.py	2011-01-31 22:09:46 +0000
@@ -450,8 +450,14 @@
     manager = get_shelf_manager()
     shelves = manager.active_shelves()
     if shelves:
-        params.to_file.write('%d shelves exist. '
-            'See "bzr shelve --list" for details.\n' % len(shelves))
+        singular = '%d shelf exists. '
+        plural = '%d shelves exist. '
+        if len(shelves) == 1:
+            fmt = singular
+        else:
+            fmt = plural
+        params.to_file.write(fmt % len(shelves))
+        params.to_file.write('See "bzr shelve --list" for details.\n')
 
 
 hooks = StatusHooks()

=== modified file 'bzrlib/tests/blackbox/test_status.py'
--- a/bzrlib/tests/blackbox/test_status.py	2010-10-29 17:26:03 +0000
+++ b/bzrlib/tests/blackbox/test_status.py	2011-01-31 22:09:46 +0000
@@ -562,7 +562,16 @@
         self.assertStatus([
                 'added:\n',
                 '  bye.c\n',
-                '1 shelves exist. See "bzr shelve --list" for details.\n',
+                '1 shelf exists. See "bzr shelve --list" for details.\n',
+            ],
+            wt)
+        self.run_bzr(['shelve', '--all', '-m', 'bar'])
+        self.build_tree(['spam.c'])
+        wt.add('spam.c')
+        self.assertStatus([
+                'added:\n',
+                '  spam.c\n',
+                '2 shelves exist. See "bzr shelve --list" for details.\n',
             ],
             wt)
 

=== modified file 'doc/en/release-notes/bzr-2.2.txt'
--- a/doc/en/release-notes/bzr-2.2.txt	2010-12-24 17:47:53 +0000
+++ b/doc/en/release-notes/bzr-2.2.txt	2011-02-02 14:33:27 +0000
@@ -5,10 +5,49 @@
 .. toctree::
    :maxdepth: 1
 
+bzr 2.2.4
+#########
+
+:2.2.4: NOT RELEASED YET
+
+Compatibility Breaks
+********************
+
+New Features
+************
+
+Bug Fixes
+*********
+
+* Fix communications with the Launchpad web service when using
+  launchpadlib >= 1.5.5.  This was a latent bug in bzr's communication
+  with Launchpad's production instance, which only became a problem when
+  the default instance was switched from edge to production in bzr 2.2.3.
+  (Max Bowsher, #707075)
+
+Improvements
+************
+
+Documentation
+*************
+
+API Changes
+***********
+
+Internals
+*********
+
+Testing
+*******
+
+
 bzr 2.2.3
 #########
 
-:2.2.3: NOT RELEASED YET
+:2.2.3: 2011-01-20
+
+This is a bugfix release. Upgrading is recommended for all users
+on earlier 2.2 releases.
 
 Compatibility Breaks
 ********************
@@ -19,19 +58,23 @@
   been updated in this release to talk to the main (``launchpad.net``) servers,
   rather than the ``edge`` ones. (Vincent Ladeuil, #583667)
 
-New Features
-************
-
 Bug Fixes
 *********
 
 * Avoid UnicodeDecodeError in ``bzr add`` with multiple files under a non-ascii
   path on windows from symlink support addition. (Martin [gz], #686611)
 
+* Correctly resolve content (and path) conflicts for files in subdirs.
+  (Vincent Ladeuil, #660935)
+
 * Don't probe for a repository from within ``NotBranchError.__repr__``,
   because this can cause knock-on errors at awkward times.
   (Andrew Bennetts, #687653)
 
+* Fix a crash during ``RepositoryPackCollection.pack`` caused by a
+  concurrent repository pack operation.  This was particularly affecting
+  ``bzr-svn`` users.  (Andrew Bennetts, #701940)
+
 * ``https`` access works again with recent versions of python2.7.
   (Vincent Ladeuil, #693880)
 
@@ -39,20 +82,6 @@
   symlinks.  Instead, it returns False, like other Trees and methods.
   (Aaron Bentley, #681885)
 
-Improvements
-************
-
-Documentation
-*************
-
-API Changes
-***********
-
-Internals
-*********
-
-Testing
-*******
 
 bzr 2.2.2
 #########
@@ -62,9 +91,6 @@
 This is a bugfix release. None of these bugfixes are critical, but upgrading
 is recommended for all users on earlier 2.2 releases.
 
-New Features
-************
-
 Bug Fixes
 *********
 




More information about the bazaar-commits mailing list