Rev 6026: (jameinel) Bug #816417, handle if Branch.base is None (John A Meinel) in file:///home/pqm/archives/thelove/bzr/2.4/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Sat Aug 6 01:29:12 UTC 2011


At file:///home/pqm/archives/thelove/bzr/2.4/

------------------------------------------------------------
revno: 6026 [merge]
revision-id: pqm at pqm.ubuntu.com-20110806012906-nhbhiz93ghzdaew3
parent: pqm at pqm.ubuntu.com-20110801083629-01vbiolx4vyww001
parent: john at arbash-meinel.com-20110805164527-y0swohsinmalsf71
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: 2.4
timestamp: Sat 2011-08-06 01:29:06 +0000
message:
  (jameinel) Bug #816417, handle if Branch.base is None (John A Meinel)
modified:
  bzrlib/plugins/launchpad/__init__.py __init__.py-20060315182712-2d5feebd2a1032dc
  bzrlib/plugins/launchpad/test_lp_api_lite.py test_lp_api_lite.py-20110713114529-lurqfgc09yifvs3u-1
=== modified file 'bzrlib/plugins/launchpad/__init__.py'
--- a/bzrlib/plugins/launchpad/__init__.py	2011-07-26 08:18:56 +0000
+++ b/bzrlib/plugins/launchpad/__init__.py	2011-08-05 16:42:53 +0000
@@ -479,9 +479,11 @@
     :return: If this isn't a packaging branch, return None. If it is, return
         (archive, series, project)
     """
+    if url is None:
+        return None
     m = _package_branch.search(url)
     if m is None:
-        return
+        return None
     archive, series, project, user = m.group('archive', 'series',
                                              'project', 'user')
     if series is not None:

=== modified file 'bzrlib/plugins/launchpad/test_lp_api_lite.py'
--- a/bzrlib/plugins/launchpad/test_lp_api_lite.py	2011-07-26 08:18:56 +0000
+++ b/bzrlib/plugins/launchpad/test_lp_api_lite.py	2011-08-05 16:45:27 +0000
@@ -328,6 +328,9 @@
         self.assertNotPackageBranch(
             'http://bazaar.launchpad.net/+branch'
             '/~user/ubuntu/natty/foo/natty')
+        # Older versions of bzr-svn/hg/git did not set Branch.base until after
+        # they called Branch.__init__().
+        self.assertNotPackageBranch(None)
 
     def test__get_package_branch_info(self):
         self.assertBranchInfo(




More information about the bazaar-commits mailing list